From: horwitz Date: Sun, 11 Jun 2006 18:19:44 +0000 (+0000) Subject: fix town names with sz in destination dialog X-Git-Tag: navit-0.5.0.5194svn~4911 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4b3f3a4e1173db51501e3ffdd986c8da651b7fc;p=profile%2Fivi%2Fnavit.git fix town names with sz in destination dialog git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@99 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/src/destination.c b/navit/src/destination.c index 187568d..292e630 100644 --- a/navit/src/destination.c +++ b/navit/src/destination.c @@ -44,7 +44,7 @@ struct search_param { int number_low, number_high; GtkWidget *clist; int count; -} search_param2 = {}; +} search_param2; struct destination { struct town *town; @@ -499,15 +499,15 @@ static void changed(GtkWidget *widget, struct search_param *search) if (widget == entry_city) { int i; for(i = 0 ;i < strlen(str); i++) { - char u = toupper(str[i]); + unsigned char u = str[i]; - if (u == 'ä') str[i] = 'a'; - if (u == 'ö') str[i] = 'o'; - if (u == 'ü') str[i] = 'u'; - if (u == 'ß') { + if (u == 0xc4 || u == 0xe4) str[i] = 'a'; + if (u == 0xd6 || u == 0xf6) str[i] = 'o'; + if (u == 0xdc || u == 0xfc) str[i] = 'u'; + if (u == 0xdf) { char *tmp; str[i] = '\0'; - tmp = g_strjoin(NULL, str, "ss", str[i+1], NULL); + tmp = g_strjoin(NULL, str, "ss", str+i+1, NULL); g_free(str); str = tmp; i++;