[EMAIL PROTECTED] (Denis Barbier) writes:
> Unfortunately situation is much more complex (you must check LC_ALL and
> LC_CTYPE variables too), the simplest solution is to run 'locale charmap'
> to retrieve the current encoding.

In C program, nl_langinfo(CODESET) works reliably.

Though the function is mandated by XPG5 (X/Open Portability Guide,
Issue 5), some UNIX variants lack it.  (Since GNU libc supports it,
dpkg and so on can safely use this.)

---
Tomohiro KUBOTA <[EMAIL PROTECTED]>
http://www.debian.or.jp/~kubota/




Reply via email to