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 | ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p); |
| 7 | int utf8_width(const char **start, size_t *remainder_p); |
Geoffrey Thomas | 8a9391e | 2009-01-30 04:41:28 -0500 | [diff] [blame] | 8 | int utf8_strwidth(const char *string); |
Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 9 | int is_utf8(const char *text); |
Junio C Hamano | 677cfed | 2006-12-30 12:20:43 -0800 | [diff] [blame] | 10 | int is_encoding_utf8(const char *name); |
| 11 | |
Johannes Schindelin | 094e03b | 2007-02-27 16:20:31 +0100 | [diff] [blame] | 12 | int print_wrapped_text(const char *text, int indent, int indent2, int len); |
Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 13 | |
Junio C Hamano | b45974a | 2006-12-23 23:36:55 -0800 | [diff] [blame] | 14 | #ifndef NO_ICONV |
| 15 | char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding); |
| 16 | #else |
| 17 | #define reencode_string(a,b,c) NULL |
| 18 | #endif |
| 19 | |
Johannes Schindelin | 9e83266 | 2006-12-22 22:06:08 +0100 | [diff] [blame] | 20 | #endif |