Why my xterm treat Chinese chars as two?

0

I am using tinycorelinux 5.2, and compiled xterm 297 myself with --with-x --enable-freetye.

Now the display is OK. I could see Chinese chars without problems.

But when I input Chinese, there is something wrong. I have to move cursor twice to actually move to next char.

What should I do?

Magicloud

Posted 2014-01-27T06:02:15.407

Reputation: 155

Answers

0

You can thank the programmers from Linux to Big Blue to Microsoft for this. It is a well known fact that TextPad as an example in world of scripting does not handle multi-byte characters which is what is used for the various Oriental dialects like Kanji and others. While a pain for you to keep your code lean and trim, the programmers in the Orient cannot use programs like your command-line or lower programs that cannot handle the mult-byte characters.

It boils down to this - encoding from UTF-8 to Big Endian and so on..

http://en.wikipedia.org/wiki/Variable-width_encoding

Hope this helps.

Leptonator

Posted 2014-01-27T06:02:15.407

Reputation: 441