[patch 01/11] terminal: Decode UTF-8 only from bytes, not from codes of special keys.

Kalle Olavi Niemitalo <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev
01 (text/x-patch, 897 B)
terminal: Decode UTF-8 only from bytes, not from codes of special keys.

---
commit ec5615acd7252563fc4745f14a7afbba049227fa
tree 026faf147a0a62f70a1865795e270b9e76d48de4
parent 40e257bedd59c35b4a54c5e85e4391383ad6bf84
author Kalle Olavi Niemitalo <[email protected]> Sat, 05 Aug 2006 13:42:08 +0300
committer Kalle Olavi Niemitalo <[email protected]> Sat, 05 Aug 2006 19:49:35 +0300

 src/terminal/event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/terminal/event.c b/src/terminal/event.c
index f70854a..71f3950 100644
--- a/src/terminal/event.c
+++ b/src/terminal/event.c
@@ -272,7 +272,7 @@ #else
 #endif /* CONFIG_UTF_8 */
 
 		if (interlink->utf_8.len) {
-			if ((key & 0xC0) == 0x80 && utf8_io) {
+			if (key >= 0x80 && key <= 0xBF && utf8_io) {
 				interlink->utf_8.ucs <<= 6;
 				interlink->utf_8.ucs |= key & 0x3F;
 				if (! --interlink->utf_8.len) {
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFE1N5+Hm9IGt60eMgRAmgEAJ9XdpvzWES+O1NGIpggeE+2QX1a6QCfdCyu
ViED39zJPI/WFa1oD92u98w=
=7Gvk
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.