5 ENCODING_COMPOUND
, /* X Consortium Compound Text (ISO 2022-like) */
6 ENCODING_LATIN_1
/* ISO 8859-1 */
9 extern char *to_utf8( enum gwm_encoding encoding
, const char *in
, size_t len
);
11 /* Return a pointer to the first illegal byte in STR, or NULL if the
12 entire string is legal. */
13 extern PURE
unsigned char *utf8_illegal( const unsigned char *str
);
15 /* Return the number of characters in STR. */
16 extern PURE
int utf8_length( const unsigned char *str
);
18 /* Duplicate a UTF-8 string. The output is allocated with malloc() and
19 is guaranteed to be a legal UTF-8 sequence, even if the input was not. */
20 extern MALLOC
unsigned char *utf8_dup_valid_len( const unsigned char *str
,
22 extern MALLOC
unsigned char *utf8_dup_valid( const unsigned char *str
);
24 /* Return the character pointed to by P (which is advanced). */
25 extern uint32_t utf8_next( const unsigned char **p
);
28 extern void cleanup_utf8( void );