From e4b3f3a4e1173db51501e3ffdd986c8da651b7fc Mon Sep 17 00:00:00 2001 From: horwitz Date: Sun, 11 Jun 2006 18:19:44 +0000 Subject: [PATCH] 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 --- navit/src/destination.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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++; -- 2.7.4