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: Paolo Carlini <pcarlini at suse dot de>
- To: Martin Sebor <sebor at roguewave dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 08 Apr 2004 22:28:09 +0200
- Subject: Re: [RFC] moneypunct<wchar_t>: mbsrtowcs or just btowc?
Thanks for your feedback!
I believe the pointers do in fact point to multibyte strings.
In the zh_CN locale, for instance, the UCS currency symbol is
U+FFE5. In the typical charset for this locale, GBK, the symbol
is encoded in the two bytes "\xa3\xa4"
I see, thanks.
What makes you think otherwise?
Basically, lack of examples (that now you kindly provided) and,
perhaps, a little too terse info in the C standard and in the
glibc docs (that just talk about char*)
Also, seemed really weird that the very same info is used both for
char and wchar_t, in particular, that, for char, symbol_length == 2
actually means two _bytes_ not two chars (in your example)! Isn't
this a little counterintuitive?
Paolo.