From f405e86de361ec305dc2b8634efeaa23dc144053 Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Fri, 20 Sep 2013 18:37:33 -0700 Subject: util, utf8: make ellipsize take multi-byte characters into account rename old versions to ascii_* Do not take into account zerowidth characters, but do consider double-wide characters. Import needed utf8 helper code from glib. v3: rebase ontop of utf8 restructuring work [zj: tweak the algorithm a bit, move new code to separate file] --- src/shared/utf8.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shared/utf8.h') diff --git a/src/shared/utf8.h b/src/shared/utf8.h index 96a03ea7cb..e3eef11bb9 100644 --- a/src/shared/utf8.h +++ b/src/shared/utf8.h @@ -35,3 +35,4 @@ char *ascii_filter(const char *s); char *utf16_to_utf8(const void *s, size_t length); int utf8_encoded_valid_unichar(const char *str); +int utf8_encoded_to_unichar(const char *str); -- cgit v1.2.3-54-g00ecf