Re: Detecting UTF-8 Locale Question

From: Jungshik Shin (
Date: Thu Mar 27 2003 - 21:15:42 EST

  • Next message: Jungshik Shin: "Re: Annotation"

    On Wed, 26 Mar 2003, Otto Stolz wrote:

    > Edward H Trager wrote:
    > > (1) Is examination of the LC_CTYPE environment variable on UNIX-like
    > > environments a sufficient way of detecting locale?
    > No, see <>.
    > - <>
    > - <>
    > - <>

      Unfortunately, they don't make it very clear that nl_langinfo(CODESET)
    has to be consulted first if what's necessary is the codeset in effect
    at the moment. There are a lot of other nl_langinfo categories you can
    query with nl_langinfo(see langinfo.h in the ref. given below). Anyway,
    the most authorative reference to POSIX system is Single Unix Spec. v3
    (aligned with POSIX IEEE 1xxx) available at
    (follow the link for C955 and search for 'nl_langinfo', 'locale',
    'setlocale', 'langinfo.h', etc)

       Jungshik Shin

    This archive was generated by hypermail 2.1.5 : Thu Mar 27 2003 - 22:04:11 EST