+extern size_t
+utf16le_strlen(const utf16lechar *s);
+
+/* encoding.c */
+extern void
+iconv_global_cleanup();
+
+extern bool wimlib_mbs_is_utf8;
+
+#define DECLARE_CHAR_CONVERSION_FUNCTIONS(varname1, varname2, \
+ chartype1, chartype2) \
+ \
+extern int \
+varname1##_to_##varname2##_nbytes(const chartype1 *in, size_t in_nbytes,\
+ size_t *out_nbytes_ret); \
+ \
+extern int \
+varname1##_to_##varname2##_buf(const chartype1 *in, size_t in_nbytes, \
+ chartype2 *out); \
+ \
+extern int \
+varname1##_to_##varname2(const chartype1 *in, size_t in_nbytes, \
+ chartype2 **out_ret, \
+ size_t *out_nbytes_ret); \
+
+/* multi-byte string to UTF16-LE string */
+DECLARE_CHAR_CONVERSION_FUNCTIONS(mbs, utf16le, mbchar, utf16lechar);
+
+/* UTF16-LE string to multi-byte string */
+DECLARE_CHAR_CONVERSION_FUNCTIONS(utf16le, mbs, utf16lechar, mbchar);
+
+/* UTF-8 string to multi-byte string */
+DECLARE_CHAR_CONVERSION_FUNCTIONS(utf8, mbs, utf8char, mbchar);
+
+extern bool
+utf8_str_contains_nonascii_chars(const utf8char *utf8_str);
+
+#ifndef min