From 2fbe86924f7ac0ec1b18fcc35805006456a305c2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Oct 2012 08:22:16 +0000 Subject: unicode in Weather search git-svn-id: http://svn.miranda-ng.org/main/trunk@1980 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Weather/src/weather.h | 1 + protocols/Weather/src/weather_addstn.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/Weather/src/weather.h b/protocols/Weather/src/weather.h index 400d5e6778..6541b24f31 100644 --- a/protocols/Weather/src/weather.h +++ b/protocols/Weather/src/weather.h @@ -43,6 +43,7 @@ along with this program. If not, see . #include #include +#include #include #include #include diff --git a/protocols/Weather/src/weather_addstn.cpp b/protocols/Weather/src/weather_addstn.cpp index 31a83f75fc..f4f3740023 100644 --- a/protocols/Weather/src/weather_addstn.cpp +++ b/protocols/Weather/src/weather_addstn.cpp @@ -307,9 +307,12 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * TCHAR Name[MAX_DATA_LEN], str[MAX_DATA_LEN], sID[MAX_DATA_LEN], *szData = NULL, *search; // replace spaces with %20 - char *pstr = (char*)CallService(MS_NETLIB_URLENCODE, 0, (LPARAM)(char*)_T2A(name)); - wsprintfA(loc, sData->SearchURL, pstr); - HeapFree(GetProcessHeap(), 0, pstr); + { + mir_ptr szSearchName( mir_utf8encodeT(name)); + char *pstr = (char*)CallService(MS_NETLIB_URLENCODE, 0, (LPARAM)(char*)szSearchName); + wsprintfA(loc, sData->SearchURL, pstr); + HeapFree(GetProcessHeap(), 0, pstr); + } if (InternetDownloadFile(loc, NULL, &szData) == 0) { TCHAR* szInfo = szData; -- cgit v1.2.3