-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 73c9c55)
- Loading branch information
Showing
1 changed file
with
60 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters