Delphi Show Unicode text received with idHTTP.Get in multilingual Windows

I need your help. Please help me.

I have Delphi 2010

I am trying to use an idHTTP.Get file with Unicode text (Russian) from a site in MemoryStream on the English version of Windows 7.

Then I load this MemoryStream into Unicode text, for example in Memo.

If I set the Russian language as "Language for programs other than Unicode" in the control panel, the text will appear in Memo. But if I install Enlish, I get the wrong characters (* $ ^ # ~! @).

How to download Russian text in Unicode using idHTTP.Get from the site and show it correctly in any Windows (Chinese, English, etc.) ???

Thank you for your help !!!

+3
source share
3

Delphi, Unicode.

: , memystream AnsiText . AnsiString , .

, .

+1

TMemo Unicode (UTF-16). , TIdHTTP.Get(), TStream, ( Ansi encoded), Unicode, TMemo.

, - , TIdHTTP.Get(), String. TIdHTTP Unicode , :

Memo1.Text := IdHTTP1.Get('http://addr_here');
+1
  • Update to D2009 or higher
  • Use components that support unicode (I remember TMS offers some components)
  • Correctly set the encoding / page code for the language you are using.
-1
source

All Articles