diff options
author | Xavier G <xavier.github@kindwolf.org> | 2016-05-13 02:27:19 +0200 |
---|---|---|
committer | Xavier G <xavier.github@kindwolf.org> | 2016-05-13 02:27:19 +0200 |
commit | 21c07c006066115af4604e26cd89cf60f94a7d53 (patch) | |
tree | fdd7ae546475c026a7c9738d8d074b0134db6eea /src/fe-common | |
parent | 2c8648a9c889fc0a7c4b24367a3f81f08dedccb2 (diff) | |
download | irssi-21c07c006066115af4604e26cd89cf60f94a7d53.zip |
Leverage string_policy().
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/formats.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index def03e10..3e88426f 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -425,12 +425,12 @@ int format_get_length(const char *str) { GString *tmp; int len; - gboolean utf8; + int utf8; int adv = 0; g_return_val_if_fail(str != NULL, 0); - utf8 = is_utf8() && g_utf8_validate(str, -1, NULL); + utf8 = string_policy(str); tmp = g_string_new(NULL); len = 0; @@ -464,12 +464,12 @@ int format_real_length(const char *str, int len) GString *tmp; const char *start; const char *oldstr; - gboolean utf8; + int utf8; int adv = 0; g_return_val_if_fail(str != NULL, 0); g_return_val_if_fail(len >= 0, 0); - utf8 = is_utf8() && g_utf8_validate(str, -1, NULL); + utf8 = string_policy(str); start = str; tmp = g_string_new(NULL); |