summarylogtreecommitdiffstats
path: root/unicode-channel.patch
blob: fadf82d6b7c952277d4b0402d7a2e1566d8864f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/irc_channel.c	2016-04-06 00:35:16.862674632 +0800
+++ b/irc_channel.c	2016-04-06 00:37:24.614969527 +0800
@@ -530,7 +530,7 @@
 	int i, j;
 
 	for (i = j = 0; name[i]; i++) {
-		if (name[i] > ' ' && name[i] != ',') {
+		if ((unsigned char)name[i] > ' ' && name[i] != ',') {
 			name[j++] = name[i];
 		}
 	}
@@ -612,12 +612,7 @@
 	char *translit_name;
 	gsize bytes_written;
 
-	translit_name = g_convert_with_fallback(hint, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, &bytes_written, NULL);
-
-	if (!translit_name) {
-		/* Same thing as in nick_gen() in nick.c, try again without //TRANSLIT */
-		translit_name = g_convert_with_fallback(hint, -1, "ASCII", "UTF-8", "", NULL, &bytes_written, NULL);
-	}
+	translit_name = g_convert_with_fallback(hint, -1, "UTF-8", "UTF-8", "", NULL, &bytes_written, NULL);
 
 	if (!translit_name) {
 		return NULL;