[Zhcon-devel] utf8 status with screenshot

Hello,
I'm glad to report some progress in zhcon's utf8 support.
Some of you have asked me when will zhcon support utf8 a while ago.
Originally I think a complete re-written is required to bring full
ucs2 support to zhcon. Sadly, I never have time to accomplish this.=20
Recently a couple of people mentioned to me that CCE supports utf8 via
iconv() transcoding, and zhcon certainly can do that too. So I picked
up CCE's source code and found the transcoding is a rather simple
matter of calling iconv before read/write anything. As CCE is also
licensed under GPL, I modified the conversion code in CCE to be used
in zhcon, and tested it under a FC3 system. Well, it works! You can
now display Chinese text encoded in UTF8 in zhcon (zhcon --utf8). If
you input Chinese in vim and save it to a file, the content of the
file will be encoded in UTF8 as well. See the attached picture.
Here are some restrictions:
1. Only one system encoding (GB/BIG5) can be used at any time under
utf8 locale.
2. Some programs using ncurses lib will not function correctly
under utf8 locale, notably mc and links. bash and vim work perfectly.
3. freebsd support is broken now.
I plan to release a new version after some clean up and more testing.
Cheers,
ejoy

Thread view

Hello,
I'm glad to report some progress in zhcon's utf8 support.
Some of you have asked me when will zhcon support utf8 a while ago.
Originally I think a complete re-written is required to bring full
ucs2 support to zhcon. Sadly, I never have time to accomplish this.=20
Recently a couple of people mentioned to me that CCE supports utf8 via
iconv() transcoding, and zhcon certainly can do that too. So I picked
up CCE's source code and found the transcoding is a rather simple
matter of calling iconv before read/write anything. As CCE is also
licensed under GPL, I modified the conversion code in CCE to be used
in zhcon, and tested it under a FC3 system. Well, it works! You can
now display Chinese text encoded in UTF8 in zhcon (zhcon --utf8). If
you input Chinese in vim and save it to a file, the content of the
file will be encoded in UTF8 as well. See the attached picture.
Here are some restrictions:
1. Only one system encoding (GB/BIG5) can be used at any time under
utf8 locale.
2. Some programs using ncurses lib will not function correctly
under utf8 locale, notably mc and links. bash and vim work perfectly.
3. freebsd support is broken now.
I plan to release a new version after some clean up and more testing.
Cheers,
ejoy