This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: locale::global and wcout


Hi,

first, a slightly pedantic but important observation: there is only *one* standard in force, the ISO / IEC Standard 14882: 2003, available in pdf from ISO or in printed form from Wiley: anything else, in particular online documents or manuals / books are certainly useful while learning and studying the C++ language but do not represent by themselves a standard in any sense.

That said, in the area of locale vs streams, a lot is implementation defined: our implementation, by defaults has the predefined streams (cin, cout, wcin, wcout...) synced with stdio. That means that certainly the wchar_t versions are sensible to the global locale, because they use directly the underlying wchar_t C library functions to achieve that sync. You can change that behavior (thus loosing the sync) by calling sync_with_stdio(false) before any I / O.

Paolo.


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