This is the mail archive of the libc-alpha@sources.redhat.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]
Other format: [Raw text]

Re: [RFH] Which is the value of __nl_langinfo_l(__CURRENCY_SYMBOL, loc) for xx_XX@euro locales?


Paolo Carlini <pcarlini@unitus.it> writes:

> On my i686-pc-linux-gnu, glibc2.2.5 I get _M_curr_symbol equal to a
> single char, octal \244, when using xx_XX@euro localedata (and
> asking for the local, vs international, symbol).
>
> I'm really triggering an "undefined behavior" or does in fact make
> sense asking for a local monetary symbol of a xx_XX@euro locale, and
> \244 is part of a standard specification??

You are not triggering undefined behaviour, you are triggering
implementation-defined behaviour. Whether a platform implements a
de_DE@euro locale is implementation-defined, and when it does, what
the currency symbol is.

It so happens that, in glibc, the @euro locales use ISO-8859-15 as
their CODESET, and the string "{EURO SIGN}" (U+20AC) as the currency
symbol; both is implementation defined. The fact that EURO SIGN
carries the numeric value 0244 in ISO-8859-15 derives from an
International Standard, though.

HTH,
Martin


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