From 29cec6f98ba523025acdd1aea42795985e32306f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Jun 2013 22:16:47 +0200 Subject: sub: prevent subtitle conversion if subs are known UTF-8 Currently this happens only in an obscure case (reading UTF-16 files with the old subreader). --- sub/dec_sub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/dec_sub.c') diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 2b4bfc2e8d..6129e48c38 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -312,7 +312,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_sub *sh) // Can't run auto-detection on movtext packets: it's the only codec that // even though it decodes to text has binary input data. - if (opts->sub_cp && strcmp(codec, "movtext") != 0) + if (opts->sub_cp && !sh->is_utf8 && strcmp(codec, "movtext") != 0) sub->charset = guess_sub_cp(&subs, opts->sub_cp); if (sub->charset) -- cgit v1.2.3