Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 1 | #ifndef GIT_UTF8_H |
| 2 | #define GIT_UTF8_H |
| 3 | |
Junio C Hamano | 396ccf1 | 2008-01-06 19:02:22 -0800 | [diff] [blame] | 4 | typedef unsigned int ucs_char_t; /* assuming 32bit int */ |
| 5 | |
Junio C Hamano | 44b25b8 | 2008-01-02 01:49:58 -0800 | [diff] [blame] | 6 | int utf8_width(const char **start, size_t *remainder_p); |
Geoffrey Thomas | 8a9391e | 2009-01-30 04:41:28 -0500 | [diff] [blame] | 7 | int utf8_strwidth(const char *string); |
Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 8 | int is_utf8(const char *text); |
Junio C Hamano | 677cfed | 2006-12-30 12:20:43 -0800 | [diff] [blame] | 9 | int is_encoding_utf8(const char *name); |
| 10 | |
Johannes Schindelin | a94410c | 2008-11-10 18:47:00 +0100 | [diff] [blame] | 11 | int strbuf_add_wrapped_text(struct strbuf *buf, |
| 12 | const char *text, int indent, int indent2, int width); |
Jeff King | 98acc83 | 2011-02-23 04:50:19 -0500 | [diff] [blame] | 13 | int strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len, |
| 14 | int indent, int indent2, int width); |
Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 15 | |
Junio C Hamano | b45974a | 2006-12-23 23:36:55 -0800 | [diff] [blame] | 16 | #ifndef NO_ICONV |
| 17 | char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding); |
| 18 | #else |
| 19 | #define reencode_string(a,b,c) NULL |
| 20 | #endif |
| 21 | |
Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 22 | #endif |