문제

Dim http As WinHttpRequest
Set http = New WinHttpRequest 
http.open "POST", "test.php", False
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send "txtmbx=test"
msgbox(http.responsetext)

http.responsetext is in Cyrillic and I'm unable to read text. How can I retrieve Cyrillic?

도움이 되었습니까?

해결책

The WinHTTPRequest does not support an encoding method, and while it doesn't explicitly say, I expect it uses CP_ACP, the system default codepage when converting from the received byte data to a string.

You can use the ResponseBody method to get the data as a byte array and use StrConv to convert to a string as you wish.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top