forked from mia/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
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ TextFileReader::TextFileReader(wxString const& filename, wxString encoding, bool
|
||||||
: trim(trim)
|
: trim(trim)
|
||||||
{
|
{
|
||||||
if (encoding.empty()) encoding = CharSetDetect::GetEncoding(filename);
|
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));
|
iter = agi::line_iterator<wxString>(*file, STD_STR(encoding));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue