Thanks for the clarification and direction. Following your pointer I
ended up in the Standard at 188.8.131.52/17-19 and found text quite
similar to the warnings given by Langer and Kreft. Good to know where
in the Standard those warnings came from. As noted there, it seems
that you should be OK in the case of non-state-dependent encoding, or,
as you note, with a stringstream. Is that accurate advice?
Also, if you would be so kind, could you please provide any insight
into the note in para. 19 about possibly requiring reconversion of
previously converted characters or reconstruction of the original file
contents. I'm not sure what that means, but it sounds scary.
In any case, it seems clear that changing the locale may drastically
alter how input/output data is converted, which in turn will certainly
have an impact on the calling code. One instance in which this seems
useful, and even necessary, is the case of an XML parser that reads an
initial header in the file to determine the encoding of the rest of
the file and then switches to that encoding.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:firstname.lastname@example.org ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.yqcomputer.com/