mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 11:13:12 +02:00
Fixed bug with iso2022jp locale (bug #18719)
This commit is contained in:
@@ -55,6 +55,22 @@ utf8_init ()
|
||||
local_utf8 = (ascii_strcasecmp (local_charset, "UTF-8") == 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* utf8_has_8bits: return 1 if string has 8-bits chars, 0 if only 7-bits chars
|
||||
*/
|
||||
|
||||
int
|
||||
utf8_has_8bits (char *string)
|
||||
{
|
||||
while (string && string[0])
|
||||
{
|
||||
if (string[0] & 0x80)
|
||||
return 1;
|
||||
string++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* utf8_is_valid: return 1 if UTF-8 string is valid, 0 otherwise
|
||||
* if error is not NULL, it's set with first non valid UTF-8
|
||||
|
||||
Reference in New Issue
Block a user