Boost logo

Boost Users :

From: Tom Tan \(SH/RDC\) (tom.tan_at_[hidden])
Date: 2005-05-12 20:36:50


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net