This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/10534] wcout can only print ASCII,can't print other language,eg. chinese.
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2006 09:28:11 -0000
- Subject: [Bug libstdc++/10534] wcout can only print ASCII,can't print other language,eg. chinese.
- References: <bug-10534-5896@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bkoz at gcc dot gnu dot org 2006-10-20 09:28 -------
Ie:
#include <iostream>
int
main()
{
using namespace std;
const wchar_t w1 = { 0x4e2d };// U+20013 == 0x4E2D
const wchar_t w2 = { 0x56fd };// U+22269 == 0x56FD
const wchar_t w3(20013);
const wchar_t w4(22269);
locale loc("zh_CN.utf8");
locale::global(loc);
wcout << w1 << endl;
wcout << w2 << endl;
wcout << w3 << endl;
wcout << w4 << endl;
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10534