[MPlayer-dev-eng] utf-16 encoded subtitle files

Magnus Leuthner magnus.leuthner at googlemail.com
Sun Jul 12 19:33:37 CEST 2009


On Sun, Jul 12, 2009 at 12:32 PM, compn<tempn at twmi.rr.com> wrote:
> On Sat, 11 Jul 2009 19:59:51 +0100, Magnus Leuthner wrote:
>>+    // check or unsupported utf-16 encoding and inform the user
>>+    if( j == 1 &&
>>+        (line[0]) == (char)0xFF && (line[1]) == (char)0xFE ||
>>+        (line[0]) == (char)0xFE && (line[1]) == (char)0xFF
>>+    ) {
>>+        mp_msg(MSGT_SUBREADER,MSGL_ERR,"SUB: File seems to be UTF-16 encoded. This encoding is not supported.\n");
>>+        return SUB_INVALID;
>
> it might be worth it to try to continue anyways, in the event of a false
> positive? adding a simple command line that will convert the file for
> them too?
>
> also this error message could go in help/help_mp-en.h
> so it can be translated.
>
> -compn
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>

Attached is the patch with the error message moved to
help/help_mp-en.h (and help_mp-de.h). I don't think the functionality
to convert character encodings belongs into the mplayer code, I just
wrote this patch to save other users the 30 minutes it took me to
realize the sub-file ENCODING was unsupported rather than the text
content itself.

- Mac
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utf16_warn_unsupported.patch
Type: text/x-diff
Size: 4366 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090712/87f54bfa/attachment.patch>


More information about the MPlayer-dev-eng mailing list