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: Imbue does not honour encoding


Hi,

Hi I don't know whether this is a feature or a bug but I suspect it to
be the latter.

there are various issues here. The first one is that, according to the ISO C++ standard that we are implementing, *most* of then named locale support is implementation defined, thus, unfortunately, do not expect, in general, to write code easily portable from an implementation to another. More specifically, our cin, wcin, etc, are *not* converting by default, because are synced char by char with stdio (we consider this a good compromise, in general). Thus, in order to enable conversion, you have to call std::ios::sync_with_stdio(false) at the beginning of your program. Alternately, all the filestreams are always converting.

In general, you may want to search the archives and Bugzilla for further details. In any case, we have already open a DR about missing documentation in this area, we are actively working on it.

Paolo.


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