mirror of https://github.com/odrling/Aegisub
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:
parent
e774902a29
commit
5a38d69921
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue