4 typedef unsigned int ucs_char_t
; /* assuming 32bit int */
6 int utf8_width(const char **start
, size_t *remainder_p
);
7 int utf8_strnwidth(const char *string
, int len
, int skip_ansi
);
8 int utf8_strwidth(const char *string
);
9 int is_utf8(const char *text
);
10 int is_encoding_utf8(const char *name
);
11 int same_encoding(const char *, const char *);
12 int utf8_fprintf(FILE *, const char *, ...);
14 void strbuf_add_wrapped_text(struct strbuf
*buf
,
15 const char *text
, int indent
, int indent2
, int width
);
16 void strbuf_add_wrapped_bytes(struct strbuf
*buf
, const char *data
, int len
,
17 int indent
, int indent2
, int width
);
20 char *reencode_string_iconv(const char *in
, size_t insz
,
21 iconv_t conv
, int *outsz
);
22 char *reencode_string_len(const char *in
, int insz
,
23 const char *out_encoding
,
24 const char *in_encoding
,
27 #define reencode_string_len(a,b,c,d,e) NULL
30 static inline char *reencode_string(const char *in
,
31 const char *out_encoding
,
32 const char *in_encoding
)
34 return reencode_string_len(in
, strlen(in
),
35 out_encoding
, in_encoding
,
39 int mbs_chrlen(const char **text
, size_t *remainder_p
, const char *encoding
);