mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 10:30:59 +00:00
[UTF16LE]
- Use binary mode for input and output files. Patch by Tomoya Kitagawa CORE-7705 #resolve #comment Committed in r62733. Thanks! svn path=/trunk/; revision=62733
This commit is contained in:
parent
cccfe23541
commit
87a883ba7d
|
@ -35,13 +35,13 @@ class utf_converter
|
||||||
utf_converter(string ifname, string ofname, enc_types enc = detect) : error(none), encoding(enc), fill(0), index(0)
|
utf_converter(string ifname, string ofname, enc_types enc = detect) : error(none), encoding(enc), fill(0), index(0)
|
||||||
{
|
{
|
||||||
enc_types tmp_enc;
|
enc_types tmp_enc;
|
||||||
inputfile.open(ifname.c_str(), ios::in);
|
inputfile.open(ifname.c_str(), ios::in | ios::binary);
|
||||||
if (!inputfile)
|
if (!inputfile)
|
||||||
{
|
{
|
||||||
error = iopen;
|
error = iopen;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
outputfile.open(ofname.c_str(), ios::out);
|
outputfile.open(ofname.c_str(), ios::out | ios::binary);
|
||||||
if (!outputfile)
|
if (!outputfile)
|
||||||
{
|
{
|
||||||
error = oopen;
|
error = oopen;
|
||||||
|
|
Loading…
Reference in a new issue