diff options
Diffstat (limited to 'misc/charset_conv.c')
-rw-r--r-- | misc/charset_conv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/charset_conv.c b/misc/charset_conv.c index 7dc1a87783..51e55c6338 100644 --- a/misc/charset_conv.c +++ b/misc/charset_conv.c @@ -234,5 +234,9 @@ bstr mp_iconv_to_utf8(struct mp_log *log, bstr buf, const char *cp, int flags) #endif failure: - return bstr_sanitize_utf8_latin1(NULL, buf); + if (flags & MP_NO_LATIN1_FALLBACK) { + return buf; + } else { + return bstr_sanitize_utf8_latin1(NULL, buf); + } } |