Leverage string_policy().

This commit is contained in:
Xavier G 2016-05-13 02:27:19 +02:00
commit 21c07c0060
4 changed files with 9 additions and 8 deletions

View file

@ -367,7 +367,7 @@ static int scrlen_str(const char *str)
g_return_val_if_fail(str != NULL, 0);
str = stripped = strip_codes(str);
if (is_utf8() && g_utf8_validate(str, -1, NULL)) {
if (string_policy(str) == TREAT_STRING_AS_UTF8) {
while (*str != '\0') {
gunichar c;