From 829337a72fd8b3c2f250812b939fdd18f16ffb2e Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 20 Feb 2015 17:43:16 +1000 Subject: [PATCH] * Subtitle::BASE : strip BOM --- lib/Subtitle/BASE.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Subtitle/BASE.pm b/lib/Subtitle/BASE.pm index f120a93..ffb9700 100644 --- a/lib/Subtitle/BASE.pm +++ b/lib/Subtitle/BASE.pm @@ -22,7 +22,7 @@ sub log { sub chomp { my ($self, $line) = @_; return unless defined $line; - return $line =~ s/[\r\n]+$//or; + return $line =~ s/(^\xEF\xBB\xBF|[\r\n]+$)//ogr; } sub trim {