# HG changeset patch # User Stu Tomlinson # Date 1113055958 0 # Node ID 8002e95c08099f20cec1d93751185e41575f2662 # Parent 6f67d4088da0f85a09535e7418de2c5a9115ce37 [gaim-migrate @ 12446] Fix URL and filename encoding in non-UTF8 locales where isalnum is true for some non-ASCII characters committer: Tailor Script diff -r 6f67d4088da0 -r 8002e95c0809 src/util.c --- 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 {