From dba7478f21d67d474573ef7cb147e04a09a539a6 Mon Sep 17 00:00:00 2001 From: akashihi Date: Sun, 21 Nov 2010 13:28:55 +0000 Subject: [PATCH] Fix:gui_qml:Fixed locale detection on WIN32 git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3694 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/gui/qml/guiProxy.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/navit/navit/gui/qml/guiProxy.h b/navit/navit/gui/qml/guiProxy.h index c4ffdc0..7648eb5 100644 --- a/navit/navit/gui/qml/guiProxy.h +++ b/navit/navit/gui/qml/guiProxy.h @@ -114,11 +114,9 @@ public slots: } QString langName() { #ifdef HAVE_API_WIN32_BASE - wchar_t wstr[32]; char str[32]; - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, wstr, sizeof(wstr)); - WideCharToMultiByte(CP_ACP,0,wstr,-1,str,sizeof(str),NULL,NULL); + GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, str, sizeof(str)); return QString()+"LOCALE_SABBREVLANGNAME="+str; #else return QString(); @@ -126,11 +124,9 @@ public slots: } QString ctryName() { #ifdef HAVE_API_WIN32_BASE - wchar_t wstr[32]; char str[32]; - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, wstr, sizeof(wstr)); - WideCharToMultiByte(CP_ACP,0,wstr,-1,str,sizeof(str),NULL,NULL); + GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, str, sizeof(str)); return QString()+"LOCALE_SABBREVCTRYNAME="+str; #else return QString(); -- 2.7.4