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?
Nathan Myers wrote:
My point was that since the international string is governed by a
standard, and anything other than (perhaps) space, dot, or an upper
case letter would be undefined, and there's no point in complexifying
to accommodate anything else.
I'm always with you when this is the point, you know well that ;)
However, this would be the only case in those functions where btowc is
sufficient, the other (as I have now learned) still needing mbsrtowc.
Therefore the ugly setlocale/__uselocale wrapping cannot be spared and
the code would become less consistent overall. So...
If somebody supplies a multibyte-encoded
character, you're not doing them any favors by covering up that they
made a mistake; the resulting "international" string wouldn't be
understood by any downstream software.
I see...
Paolo.