From: Wang W. <wa...@ma...> - 2002-10-18 14:52:26
|
Hi, there: There is a bug where handling GBK characters in mkf/lib/mkf_euccn_parser.c My patch is based on mlterm-2.6.1.cvs20020927(debian sid), and I believe that the bug also exist in the newest 2.6.2 version(not checked yet). The patch file is in the attachment. Bug details: I found this bug when I am using it on the BBS in our campus. When a half GBK character following an ANSI escape sequence(such as 0xBF ESC [ m) appears on the terminal, mlterm is confused. It takes "0xBF ESC" as one GBK char and left others ordinary ascii characters, and the screen layout is wrong, a blank line jump out. I've look it up in an official GBK standard, it saying that such "0xBF ESC" cannot be a GBK char. In fact, THE SECOND CHARACTER OF A GBK CHAR IS ALWAYS GREATER OR EQUAL THAN 0x40. So, the parser should swallow only ONE character in this case. I have test my code for some time and it works well. :) I like mlterm very much and be interested improving it. I have made a patch for saving/restoring cursor ANSI sequence two month ago. Wish this one would help. Wang WenRui |