This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [RFH] Which is the value of __nl_langinfo_l(__CURRENCY_SYMBOL, loc) for xx_XX@euro locales?
- From: martin at v dot loewis dot de (Martin v. Loewis)
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libc-alpha at sources dot redhat dot com, libstdc++ at gcc dot gnu dot org, drepper at redhat dot com
- Date: 20 Apr 2002 18:39:02 +0200
- Subject: Re: [RFH] Which is the value of __nl_langinfo_l(__CURRENCY_SYMBOL, loc) for xx_XX@euro locales?
- References: <3CC164AA.3090307@unitus.it>
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