Alaska Software Inc. - WinHttpRequest responsebody not UTF8
Username: Password:
AuthorTopic: WinHttpRequest responsebody not UTF8
JUAN GONZALEZWinHttpRequest responsebody not UTF8
on Fri, 19 Jul 2019 16:36:50 +0200
Hello.
I use WinHttp.WinHttpRequest.5.1 from Alaska Xbase but when I try:
cResponse:=oWebRequest:responseBody
I won't get UTF8 text, although I'm sure the response is UTF8.
Searching the web I found that maybe I have to use some functions related to 
SafeArray data, like:
DllCall("oleaut32\SafeArrayAccessData", "ptr", ComObjValue(body), "ptr*", 
pdata)
As I want to adapt that call to Alaska's way, I think it would be useful for 
me the file from Pablo Botella 
"http://www.xbwin.com/download/WinApi_Tutor.zip" but the link is not right any 
more.
Does anybody know where I can find it?
With kind regards.
Juan
JUAN GONZALEZRe: WinHttpRequest responsebody not UTF8
on Mon, 22 Jul 2019 18:07:10 +0200
JUAN GONZALEZ wrote in message news:41b6a15d$23d57ca5$44351@news.alaska-
software.com...
>Hello.
>I use WinHttp.WinHttpRequest.5.1 from Alaska Xbase but when I try:
>cResponse:=oWebRequest:responseBody
>I won't get UTF8 text, although I'm sure the response is UTF8.
>Searching the web I found that maybe I have to use some functions related 
to 
>SafeArray data, like:
>DllCall("oleaut32\SafeArrayAccessData", "ptr", ComObjValue(body), "ptr*", 
>pdata)
>As I want to adapt that call to Alaska's way, I think it would be useful 
for 
>me the file from Pablo Botella 
>"http://www.xbwin.com/download/WinApi_Tutor.zip" but the link is not right 
any 
>more.
>Does anybody know where I can find it?
>With kind regards.
>Juan

Hello. The problem is solved. The amazing ot4xb from Pablo Botella is great!
I had a missunderstanding with ansi/unicode/utf8 character sets, but it was 
solved with a conversion after reading responseBody.
Thanks!
With kind regards
Juan