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: [RFC] moneypunct<wchar_t>: mbsrtowcs or just btowc?


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


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