Hi,

At Wed, 26 Dec 2001 19:29:48 +0000,
Markus Kuhn wrote:

> Simply ship your software with a little nl_langinfo() emulation that
> fixes that problem until the FreeBSD people get they act together and
> finally implement it. It can't take that much longer any more.

A good work.  Bruno's libcharset is also available for this purpose.
It is a good idea to write the function as an emulation.


>   http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c
>   http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.h

Debian GNU/Linux "locales" package includes various pairs of locale
and encoding.  You may want to include them.  Especially, "TIS-620"
for "th" would be needed.  (If you want, I can send you the file.)

And, a suggestion.  If LANG (or LC_CTYPE or LC_ALL) has ".<encoding>"
part, it should be checked first.  (Now langinfo.c checks "utf" and
"8859-" only.  Chinese may use GBK or GB18030 and Hong Kong people
may use Big5HKSCS.

Some people may use alias names of locale, such as "german" for de_DE
and "french" for fr_FR.  Are there any way to manage these cases?

I have ever heard that the default encoding for Japanese locale on
some proprietary Unix is Shift_JIS, not EUC-JP.  However, I don't know
the detail and I cannot suggest a concrete sample implementation.

---
Tomohiro KUBOTA <[EMAIL PROTECTED]>
http://www.debian.or.jp/~kubota/
"Introduction to I18N"  http://www.debian.org/doc/manuals/intro-i18n/
--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to