[RFH] Which is the value of __nl_langinfo_l(__CURRENCY_SYMBOL, loc) for xx_XX@euro locales?
Martin v. Loewis
martin@v.loewis.de
Sat Apr 20 12:12:00 GMT 2002
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
More information about the Libc-alpha
mailing list