Open files as binary in TextFileReader

Text mode does undesirable things like stopping when it hits an EOF
byte, which can be a valid part of a UTF-16 character, and line_iterator
handles stripping \r anyway.

Originally committed to SVN as r6958.
This commit is contained in:
Thomas Goyne 2012-08-18 03:13:36 +00:00
parent e774902a29
commit 5a38d69921
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ TextFileReader::TextFileReader(wxString const& filename, wxString encoding, bool
: trim(trim)
{
if (encoding.empty()) encoding = CharSetDetect::GetEncoding(filename);
file.reset(agi::io::Open(STD_STR(filename)));
file.reset(agi::io::Open(STD_STR(filename), true));
iter = agi::line_iterator<wxString>(*file, STD_STR(encoding));
}