summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-22 13:06:36 +0100
committerwm4 <wm4@nowhere>2017-01-22 13:06:36 +0100
commit310671e91a59b5f1841127fb540c5ceac21979ec (patch)
tree6b5d8a339489fd9332273bfef4bc45480a9b6f62 /misc
parent73858bb0ccac91b6a529c8dd4b825f47aa28c4b7 (diff)
downloadmpv-310671e91a59b5f1841127fb540c5ceac21979ec.tar.bz2
mpv-310671e91a59b5f1841127fb540c5ceac21979ec.tar.xz
charset_conv: support minimum compatibility to utf8:... syntax
Because it's the most commonly used one, and trivial to support.
Diffstat (limited to 'misc')
-rw-r--r--misc/charset_conv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/charset_conv.c b/misc/charset_conv.c
index c38c1fbd77..5c38cfad0e 100644
--- a/misc/charset_conv.c
+++ b/misc/charset_conv.c
@@ -106,7 +106,11 @@ const char *mp_charset_guess(void *talloc_ctx, struct mp_log *log, bstr buf,
{
mp_err(log, "This syntax for the --sub-codepage option was deprecated "
"and has been removed.\n");
- user_cp = "";
+ if (strncasecmp(user_cp, "utf8:", 5) == 0) {
+ user_cp = user_cp + 5;
+ } else {
+ user_cp = "";
+ }
}
if (user_cp[0] == '+') {