utf8.c: move display_mode_esc_sequence_len() for use by other functions
[git/git.git] / utf8.h
CommitLineData
9e832665
JS
1#ifndef GIT_UTF8_H
2#define GIT_UTF8_H
3
396ccf1f
JH
4typedef unsigned int ucs_char_t; /* assuming 32bit int */
5
44b25b87 6int utf8_width(const char **start, size_t *remainder_p);
8a9391e9 7int utf8_strwidth(const char *string);
9e832665 8int is_utf8(const char *text);
677cfed5 9int is_encoding_utf8(const char *name);
0e18bcd5 10int same_encoding(const char *, const char *);
c0821965 11int utf8_fprintf(FILE *, const char *, ...);
677cfed5 12
e0db1765 13void strbuf_add_wrapped_text(struct strbuf *buf,
a94410c8 14 const char *text, int indent, int indent2, int width);
e0db1765 15void strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
98acc837 16 int indent, int indent2, int width);
9e832665 17
b45974a6 18#ifndef NO_ICONV
76759c7d 19char *reencode_string_iconv(const char *in, size_t insz, iconv_t conv);
b45974a6
JH
20char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding);
21#else
22#define reencode_string(a,b,c) NULL
23#endif
24
6cd3c053
KS
25int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding);
26
9e832665 27#endif