need help about wide character stream

hi,all i have 3 questions. 1. When i was trying wide character streams like wifstream ,wofstream , wcout etc. , i failed every time. My default locale is en_US.UTF-8. I created a test file , wrote a line Chinese "??" in that file. Then I try to use wifstream to read that file, after reading, i print it to stdout and write to another file. As a result , i got nothing. Assuming "input.txt" is the input file which contains Chinese character. BTW , input.txt is encoded with UTF-8. locale.global("en_US.UTF-8"); wifstream win("input.txt"); wcout<<win.rdbuf()<<endl; wofstream wout("output.txt"); wout<<win.rdbuf()<<endl; wout.close(); I got ouput: $ <nothing> $ wc -c outpu.txt $ 0 output.txt I am deeply puzzled, How does wide character stream works? 2. Can anybody explain why IBM ICU (International Component for Unicode) exists? What 's it for by comparing with stdc++ wide character mechanism? If it is necessary , is there any consideration to invent a similar package in BOOST? 3. Since my post looks more like a stdc++ question , anybody can tell me how i can join a stdc++ mail list? Thanks in advance. /Tom
participants (1)
-
Tom Tan (SH/RDC)