1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-20 22:02:59 +00:00
mpv/mpvcore/charset_conv.h
wm4 3e6ed76935 sub: don't print detected charset if it's UTF-8
Too noisy. This also fixes that iconv() was called if "utf8" was used
as codepage.
2013-08-15 23:40:04 +02:00

20 lines
650 B
C

#ifndef MP_CHARSET_CONV_H
#define MP_CHARSET_CONV_H
#include <stdbool.h>
#include "mpvcore/bstr.h"
enum {
MP_ICONV_VERBOSE = 1, // print errors instead of failing silently
MP_ICONV_ALLOW_CUTOFF = 2, // allow partial input data
MP_STRICT_UTF8 = 4, // don't fall back to UTF-8-BROKEN when guessing
};
bool mp_charset_is_utf8(const char *user_cp);
bool mp_charset_requires_guess(const char *user_cp);
const char *mp_charset_guess(bstr buf, const char *user_cp, int flags);
bstr mp_charset_guess_and_conv_to_utf8(bstr buf, const char *user_cp, int flags);
bstr mp_iconv_to_utf8(bstr buf, const char *cp, int flags);
#endif