c++ unicode writing is not working
Posted
by
Jugal Kishore
on Stack Overflow
See other posts from Stack Overflow
or by Jugal Kishore
Published on 2012-04-12T09:20:08Z
Indexed on
2012/04/13
5:29 UTC
Read the original article
Hit count: 145
I am trying to write some Russian unicode text in file by wfstream. Following piece of code has been used for it.
wfstream myfile;
locale AvailLocale("Russian");
myfile.imbue(AvailLocale);
myfile.open(L"d:\\example.txt",ios::out);
if (myfile.is_open())
{
myfile << L"?????? ????" <<endl;
}
myfile.flush();
myfile.close();
Something unrecognizable is written to the file by executing this code, I am using VS 2008.
© Stack Overflow or respective owner