diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-02 17:08:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-02 17:08:11 +0100 |
| commit | c24798d1ab4bb75c8ee0c8b8663b11e599df1c25 (patch) | |
| tree | e7bf4102100af9685aa28f79ae5581e38296c18c /src/subrip_reader.cc | |
| parent | 7910e19cf145cbdc99fbf1015add6f8eb792e160 (diff) | |
Remove unicode BOM from SSA files.
Diffstat (limited to 'src/subrip_reader.cc')
| -rw-r--r-- | src/subrip_reader.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc index a82862c..f71843e 100644 --- a/src/subrip_reader.cc +++ b/src/subrip_reader.cc @@ -81,17 +81,7 @@ SubripReader::read (function<optional<string> ()> get_line) } trim_right_if (*line, boost::is_any_of ("\n\r")); - - if ( - line->length() >= 3 && - static_cast<unsigned char> (line.get()[0]) == 0xef && - static_cast<unsigned char> (line.get()[1]) == 0xbb && - static_cast<unsigned char> (line.get()[2]) == 0xbf - ) { - - /* Skip Unicode byte order mark */ - line = line->substr (3); - } + remove_unicode_bom (line); switch (state) { case COUNTER: |
