This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/10534] wcout can only print ASCII,can't print other language,eg. chinese.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]