You are not logged in.
Pages: 1
Greetings..
I am a big fan of this opensource project. I am a delphi student and came across a problem while trying to send get request using TWinHttp. The result is in rawbytestring which cannot show unicode characters.
The same result can be obtained using IdHttp.get() method, but it is very slow in comparison to TWinHttp. How can I get the unicode characters in the result. I am using Delphi XE6.
Offline
There is no "Unicode" in HTTP.
HTTP send some raw bytes over the wire, and the format is indicated in the HTTP header itself.
Most of the time, it is UTF-8.
Use UTF8ToString() to convert the rawbytestring returned by TWinHTTP, or WinAnsiToUnicodeString() if the returned text is CP-1252 encoded.
Offline
UTFToString() worked as expected. Thanks alot.
Offline
Pages: 1