diff options
author | Dudemanguy <random342@airmail.cc> | 2023-10-01 13:21:56 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-07 02:41:27 +0000 |
commit | da4f11803febd0e75d3d62a965e17731bd328506 (patch) | |
tree | 1005b2176a25dd45080f6b699697fa6399f96fb1 /misc/charset_conv.c | |
parent | 50b23a8c4493517fa2130250d22d94bca4e27804 (diff) | |
download | mpv-da4f11803febd0e75d3d62a965e17731bd328506.tar.bz2 mpv-da4f11803febd0e75d3d62a965e17731bd328506.tar.xz |
demux: change the default of metadata-codepage to auto
There's really no reason not to do this especially since sub-codepage
already defaults to auto. Also change logging in charset_conv since
telling us that the data is UTF-8 if the passed codepage value is "auto"
or "utf-8" is really not useful information (that's the expectation).
Diffstat (limited to 'misc/charset_conv.c')
-rw-r--r-- | misc/charset_conv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/charset_conv.c b/misc/charset_conv.c index f649057fe8..3668f3b652 100644 --- a/misc/charset_conv.c +++ b/misc/charset_conv.c @@ -114,7 +114,8 @@ const char *mp_charset_guess(void *talloc_ctx, struct mp_log *log, bstr buf, int r = bstr_validate_utf8(buf); if (r >= 0 || (r > -8 && (flags & MP_ICONV_ALLOW_CUTOFF))) { - mp_verbose(log, "Data looks like UTF-8, ignoring user-provided charset.\n"); + if (strcmp(user_cp, "auto") != 0 && !mp_charset_is_utf8(user_cp)) + mp_verbose(log, "Data looks like UTF-8, ignoring user-provided charset.\n"); return "utf-8"; } |