This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/15732] wifstream does not work with UTF-8
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 May 2004 13:32:34 -0000
- Subject: [Bug libstdc++/15732] wifstream does not work with UTF-8
- References: <20040530131657.15732.ahlgren@lysator.liu.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-30 13:32 -------
Can you provide the error?
Also what do you have set of LC_* and LANG because it is dependent on them.
Also are you sure that you have a libc which supports UTF-8 encoding.
Oh here is the .cc file I derived from the .ii file:
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "");
locale loc("");
wcin.imbue(loc);
wcout.imbue(loc);
wifstream fin("metaportal.def");
wstring s;
while (wcin >> s) wcout << s << L" ";
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15732