[mythtv-commits] Ticket #9836: UTF-16LE .srt subtitle files do not work
MythTV
noreply at mythtv.org
Sat Sep 7 14:08:40 UTC 2013
#9836: UTF-16LE .srt subtitle files do not work
----------------------------------+----------------------------
Reporter: joe@… | Owner: stichnot
Type: Bug Report - General | Status: accepted
Priority: minor | Milestone: 0.27.1
Component: MythTV - Captions | Version: 0.24-fixes
Severity: medium | Resolution:
Keywords: subtitle srt utf-16 | Ticket locked: 0
----------------------------------+----------------------------
Comment (by Jim Stichnoth <jstichnoth@…>):
In [changeset:"2efe2796efa68109f9d5635151186e60e4d5c0de/mythtv"]:
{{{
#!CommitTicketReference repository="mythtv"
revision="2efe2796efa68109f9d5635151186e60e4d5c0de"
Handle UTF-16 encoded text subtitle files. Refs #9836
The code imported from xine that parses external text subtitle files
(e.g. .srt files) uses a great number of sscanf() calls, which doesn't
work with UTF-16 character arrays, nor any other encoding that
includes NUL characters or expands/obfuscates ASCII characters.
Instead of modifying the parser code, we convert the original file
contents to UTF-8 (auto-detecting the original encoding where
possible), send it to the xine code for parsing, and then convert the
individual subtitle strings back to unicode for presentation.
This is adapted from a patch written by Mark Kendall.
(cherry picked from commit 73c9c55bc202c01d2b6c2172a00293a475672830)
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/9836#comment:22>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list