This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: UTF-8 support - char or wchar_t?
- From: Carlo Wood <carlo at alinoe dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Ole Laursen <olau at hardworking dot dk>, libstdc++ at gcc dot gnu dot org
- Date: Sun, 20 Jun 2004 22:17:58 +0200
- Subject: Re: UTF-8 support - char or wchar_t?
- References: <87r7sajizw.fsf@bach.composers> <40D5D37D.10600@suse.de>
On Sun, Jun 20, 2004 at 08:12:13PM +0200, Paolo Carlini wrote:
> To bel clear, if you *amend* your testcase as follows:
>
> #include <iostream>
>
> int main()
> {
> std::ios::sync_with_stdio(false);
>
> std::wcout.imbue(std::locale("fi_FI.UTF-8"));
> std::wcout << 1224 << std::endl;
> }
This confuses me too (and I will need it too in the
near future for a GTK+ application).
Can you please explain why one needs wchar_t (wcout)
at all when using UTF-8? I'd expect that UTF-8 fits
in a stream of 8-bit octets and no wchar_t should
be needed at all.
I am sorry to be off topic - but this is highly confusing.
--
Carlo Wood <carlo@alinoe.com>