Mercurial > trustbridge
comparison packaging/desktopshellrun.cpp @ 1158:ffdc8cba139a
(issue36) Add acp_to_wchar based on utf8_to_wchar
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 15:43:48 +0200 |
parents | 4a17c9f977d0 |
children | 12ed0b72e9f5 |
comparison
equal
deleted
inserted
replaced
1157:fd7d04bb37cb | 1158:ffdc8cba139a |
---|---|
271 { | 271 { |
272 ERRORPRINTF ("Failed to get the shell dispatch interface."); | 272 ERRORPRINTF ("Failed to get the shell dispatch interface."); |
273 goto done; | 273 goto done; |
274 } | 274 } |
275 | 275 |
276 wbuf = utf8_to_wchar((*stacktop)->text, strlen((*stacktop)->text)); | 276 /* For unicodensis this has to be utf8 to wchar */ |
277 | |
278 wbuf = acp_to_wchar((*stacktop)->text, strlen((*stacktop)->text)); | |
277 if (!wbuf) | 279 if (!wbuf) |
278 { | 280 { |
279 ERRORPRINTF ("Failed to convert argument to wchar. error = 0x%lx.", hr); | 281 ERRORPRINTF ("Failed to convert argument to wchar. error = 0x%lx.", hr); |
280 goto done; | 282 goto done; |
281 } | 283 } |
282 | 284 |
283 if ((*stacktop)->next && (*stacktop)->next->text) | 285 if ((*stacktop)->next && (*stacktop)->next->text) |
284 { | 286 { |
285 params = utf8_to_wchar((*stacktop)->next->text, strlen((*stacktop)->next->text)); | 287 params = acp_to_wchar((*stacktop)->next->text, strlen((*stacktop)->next->text)); |
286 } | 288 } |
287 | 289 |
288 if (!shellexecute(shellDispatch, wbuf, params)) | 290 if (!shellexecute(shellDispatch, wbuf, params)) |
289 { | 291 { |
290 ERRORPRINTF ("Failed to execute."); | 292 ERRORPRINTF ("Failed to execute."); |