From c24798d1ab4bb75c8ee0c8b8663b11e599df1c25 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 2 Jun 2016 17:08:11 +0100 Subject: Remove unicode BOM from SSA files. --- src/subrip_reader.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/subrip_reader.cc') 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 ()> get_line) } trim_right_if (*line, boost::is_any_of ("\n\r")); - - if ( - line->length() >= 3 && - static_cast (line.get()[0]) == 0xef && - static_cast (line.get()[1]) == 0xbb && - static_cast (line.get()[2]) == 0xbf - ) { - - /* Skip Unicode byte order mark */ - line = line->substr (3); - } + remove_unicode_bom (line); switch (state) { case COUNTER: -- cgit v1.2.3