This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Some details on the named locale problem


Paolo Carlini <pcarlini@unitus.it> writes:

> Therefore, in general we will leave the thousands separator as
> returned by libc and, in the case of glibc, we will infer from the
> particular value \0 a grouping == "", right?

This is a problem with the C++ ABI.  In C, as mentioned, adding an
empty string doesn't change anything.  Since the C++ interface is
broken by design and requires a character you'll have to handle a NUL
character special and, yes, probably set the grouping string to a
value so that the code does not try to group anything.

> The patch I have just posted, for the time being does just this.

And I agree with it, it is correct.  And not only for glibc, it's
generally correct.  ISO C uses an empty string to denote no thousands
separator.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


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