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++/14623] UTF-8 encoding, wcout vs. file


------- Additional Comments From peturr02 at ru dot is  2004-03-18 10:03 -------
The testcase has a bug:

cout << locale().name() << endl;

Since this is the first I/O operation on stdout, it causes stdout to become
a byte-oriented stream (fwide(stdout, 0) < 0). Doing wide I/O on a narrow
stream is not a good idea. See what happens if cout is replaced (everywhere)
with cerr and "printf(" with "fprintf(stderr, ".



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14623


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