summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/weather_addstn.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-19 08:22:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-19 08:22:16 +0000
commit2fbe86924f7ac0ec1b18fcc35805006456a305c2 (patch)
tree0952feb667910cfce1de3c551188d0cd3e5e12fa /protocols/Weather/src/weather_addstn.cpp
parentfb99345d32aa63a503b42ec3b004871824c982a4 (diff)
unicode in Weather search
git-svn-id: http://svn.miranda-ng.org/main/trunk@1980 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Weather/src/weather_addstn.cpp')
-rw-r--r--protocols/Weather/src/weather_addstn.cpp9
1 files changed, 6 insertions, 3 deletions
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<char> 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;