[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gettext documentation not accurate for Debian?



On Mon, Oct 26, 1998 at 03:04:02AM +0100, Martin Schulze wrote:
> Nicolás Lichtmaier wrote:
> >         setlocale (LC_ALL, "");
> 
> Why is that needed?

Because one must tell the library to use the locale the user has
specified.  setlocale (LC_ALL, "") does that.  Its arguments are
magic: the call not just queries the LC_ALL environment variable, but
all the other LC_* variables as well, IIRC.  Without this call, the
locale is defined to be "C" or "POSIX", which are the default and
equivalent, and mean English in this context.

Of course, setting LC_MESSAGES will suffice, if you are worried about
LC_CTYPE messing up your isalpha() calls.  Then again, if you need to
classify characters by other rules than the locale ones, you'll be
better off writing your own character classification routines from
scratch anyway.



        Antti-Juhani
-- 
Antti-Juhani Kaijanaho A7 <gaia@iki.fi> ** <URL:http://www.iki.fi/gaia/> **

                       The FAQ is your friend.
                            Trust the FAQ.


Reply to: