Mercurial > pidgin
changeset 10800:8002e95c0809
[gaim-migrate @ 12446]
Fix URL and filename encoding in non-UTF8 locales where isalnum is true for
some non-ASCII characters
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 09 Apr 2005 14:12:38 +0000 |
parents | 6f67d4088da0 |
children | 39b5a5e30f47 |
files | src/util.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/util.c Sat Apr 09 01:24:28 2005 +0000 +++ b/src/util.c Sat Apr 09 14:12:38 2005 +0000 @@ -3075,9 +3075,9 @@ iter = str; for (; *iter && j < (BUF_LEN - 1) ; iter = g_utf8_next_char(iter)) { gunichar c = g_utf8_get_char(iter); - /* If the character is an ASCII character and is alphanumeric, - * or one of the specified values, no need to escape */ - if (c < 256 && isalnum(c)) { + /* If the character is an ASCII character and is alphanumeric + * no need to escape */ + if (c < 128 && isalnum(c)) { buf[j++] = c; } else { int bytes = g_unichar_to_utf8(c, utf_char); @@ -3452,7 +3452,7 @@ gunichar c = g_utf8_get_char(iter); /* If the character is an ASCII character and is alphanumeric, * or one of the specified values, no need to escape */ - if (c < 256 && (isalnum(c) || c == '@' || c == '-' || + if (c < 128 && (isalnum(c) || c == '@' || c == '-' || c == '_' || c == '.' || c == '#')) { buf[j++] = c; } else {