Skip Menu |

This queue is for tickets about the Video-Subtitle-SRT CPAN distribution.

Report information
The Basics
Id: 89023
Status: open
Priority: 0/
Queue: Video-Subtitle-SRT

People
Owner: Nobody in particular
Requestors: bitcardbmw [...] lsmod.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



Subject: SRT subtitle files starting with a BOM can not be read
SRT subtitle files starting with a UTF-8 BOM can not be read BOM = http://en.wikipedia.org/wiki/Byte_order_mark see attached simple patch for a possible solution
Subject: SRT.patch
--- Video/Subtitle/SRT.pm.orig 2012-04-25 09:02:42.000000000 +0200 +++ Video/Subtitle/SRT.pm 2013-09-29 10:25:52.244527401 +0200 @@ -43,6 +43,7 @@ binmode $fh, ":raw:eol(LF)"; local $/ = "\n\n"; while (my $chunk = <$fh>) { + $chunk=~s/^\xef\xbb\xbf//; my @chunk = split /\r?\n/, $chunk; if ($chunk[-1] eq "") { pop @chunk;
Subject: Re: [rt.cpan.org #89023] SRT subtitle files starting with a BOM can not be read
Date: Tue, 1 Oct 2013 13:55:49 +0900
To: bug-Video-Subtitle-SRT [...] rt.cpan.org
From: Ben Bullock <benkasminbullock [...] gmail.com>
Could you send an example .SRT file with a BOM so that I can write a test for this. Thanks! On 29 September 2013 18:59, Bernhard M. W. via RT < bug-Video-Subtitle-SRT@rt.cpan.org> wrote: Show quoted text
> Sun Sep 29 05:59:08 2013: Request 89023 was acted upon. > Transaction: Ticket created by bmwiedemann > Queue: Video-Subtitle-SRT > Subject: SRT subtitle files starting with a BOM can not be read > Broken in: 0.03 > Severity: (no value) > Owner: Nobody > Requestors: bitcardbmw@lsmod.de > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=89023 > > > > SRT subtitle files starting with a UTF-8 BOM can not be read > BOM = http://en.wikipedia.org/wiki/Byte_order_mark > > see attached simple patch for a possible solution >
From: bitcardbmw [...] lsmod.de
On Tue Oct 01 00:56:02 2013, benkasminbullock@gmail.com wrote: Show quoted text
> Could you send an example .SRT file with a BOM so that I can write a test > for this. Thanks!
attached you a small sample, which is head -70 of a .SRT file from http://www.opensubtitles.org/en/subtitles/3930661/how-to-train-your-dragon-de
Subject: sample-bom.srt
Download sample-bom.srt
application/x-subrip 1.2k

Message body not shown because it is not plain text.