This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A locale question.


> 
> hjl@lucon.org (H.J. Lu) writes:
> 
> > 1. VSX4L0 only defines LC_CTYPE. Should LC_ALL work? I mean when a new
> >    locale only defines the parts of LC_ALL, should it uses the rest
> >    from the default one? It seems that the POSIX testsuite expects this
> >    behavior. Who is correct?
> 
> A partly constructed locale can only be used if only this part of
> requested.  I.e., one has to use setlocale(LC_CTYPE, ...) instead of
> setlocale(LC_ALL, ...).
> 

>From HP-UX 10.20:

# man localedef
....
      A locale definition file also consists of six categories.  The
      beginning of each category is identified by a category tag having the
      form LC_category where category is one of the following: CTYPE,
      COLLATE, MONETARY, NUMERIC, TIME, or MESSAGES.  The end of each
      category is identified by a tag consisting of the word END followed by
      a space and the category identifier; for example, END LC_COLLATE.
      Categories can appear in any order in the locale definition file.  At
      least one category specifications is required.  If a category is not
      specified, setlocale() sets up the default ``C'' locale for that
      category (see setlocale(3C) and lang(5)).


> The localedef program is written in a way that it automatically
> creates all locale files even if they have only the default valies in
> them.

As I said, VSX4L0 only defines LC_CTYPE. localedef only created
LC_CTYPE and setlocale (LC_ALL, "VSX4L0") returns NULL. I think
it should be fixed.

> 
> > value of field `int_curr_symbol' in category `LC_MONETARY' does not correspond to a valid name in ISO 4217
> 
> If the value does not correspond to a legal value the test suite is
> buggy.  POSIX specifies that all names must come from this standard.
> So, tell me what value is used and I'll check whether it is missing
> from the list of legal values.

Here they are:

# grep int_curr_symbol *
lang1.src:int_curr_symbol   "DDM "
lang2.src:int_curr_symbol   "FRF "
lang3.src:int_curr_symbol   "DDM "
lang4.src:int_curr_symbol   "FRF "


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]