[RFC] moneypunct<wchar_t>: mbsrtowcs or just btowc?
Martin Sebor
sebor@roguewave.com
Thu Apr 8 22:11:00 GMT 2004
Paolo Carlini wrote:
> Hi Nate!
>
>> It seems as if the int_currency_symbol can't be a multibyte string,
>> because all the characters are in the basic source character set.
>
>
> Well, I'm also under this impression. The C standard mentions here
> ISO 4217. Is this consistent with your reading?
If you want the library to work with locales created by the
localedef utility you can't assume that. It's trivial to create
locales with any arbitrary currency symbol, including one that
contains multibyte character sequences. IMO, the small performance
gain you get by making these kinds of assumptions is not worth the
loss of robustness.
Martin
More information about the Libstdc++
mailing list