This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
character encoding (locale)
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: character encoding (locale)
- From: Jan Schukat <selberschuld at gmx dot de>
- Date: Tue, 12 Dec 2000 13:56:14 +0100 (MET)
I watched the sources and your documentation quite a while. As I still have
no copy of the standard (don't ask) there is one question I have.
Can a program in any way determined by the standard get the character
encoding of a file in a just opened stream. I don't mean the locales in ios or
the connected streambuf. I mean how do you get the encoding of a plain text
file.
When you do a
ifstream in("text.txt");
or
wifstream in("text.txt");
both locales (the one of the ios and the one of the connected streambuf)
are initialized. But this can be the wrong locale. So you have to get the
right one by parsing the file or something likewise?
Jan Schukat
--
Sent through GMX FreeMail - http://www.gmx.net