This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] moneypunct<wchar_t>: mbsrtowcs or just btowc?
- From: Martin Sebor <sebor at roguewave dot com>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 08 Apr 2004 15:51:28 -0600
- Subject: Re: [RFC] moneypunct<wchar_t>: mbsrtowcs or just btowc?
- References: <4075C1F4.8090807@suse.de>
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