I'm attempting to read html from a tWebBrowser component (Delphi 7) like
this :
function GetHtml:widestring;
var bod:variant;
begin
bod:=doc.frames.editbox.document.body;
result:=bod.innerhtml;
ShowMessage(inttostr(length(result))+' : '+result);
end;
(in the above doc:=IWebBrowser(pDisp).Document;)
This works fine until the html contains characters from a non-Western
alphabet (for example Greek). The tWebBrowser component displays the Greek
characters OK, but when I read the 'innerhtml' property all the Greek
characters are converted to question marks (???).
What is the correct way to read 'innerhtml' so the non-Western characters
are not destroyed?
Regards,
Adlib
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.538 / Virus Database: 333 - Release Date: 10/11/2003
If you want to work intensive with Unicode, you have to use some
Unicode-Enabled-Package:
http://home.ccci.org/wolbrink/tnt/delphi_unicode_controls.htm: Free
Unicode-Pack for WinNT-2003
http://www.lmdinnovative.com/products/lmdelpack/: Unicode-Pack for
Win95-2003 with enhanced controls
"Adlib" <nos...@nospam.nospam> schrieb im Newsbeitrag
news:3fb0...@newsgroups.borland.com...
Thanks for the links too,
Adlib
(Thinks... If Delphi components are all Ansi, then this would also explain
why I get reports from users in other countries that they are unable to
paste text from the Windows clipboard into my software...)
"Bernhard Geyer" <Bernhar...@nospam.com> wrote in message
news:3fb08ba9$1...@newsgroups.borland.com...
> Thanks Bernhard - now I understand. Are all Delphi components Ansi
> only? I need to store this data in a TStringlist ...but looking at
> the help file I suspect this is also Ansi only. Is there a
> TStringlist component for widestrings?
>
try with Tnt Delphi Unicode Controls
http://home.ccci.org/wolbrink/tnt/delphi_unicode_controls.htm
In unit TntClasses there is TTntStringList class;
> Thanks for the links too,
> Adlib
>
> (Thinks... If Delphi components are all Ansi, then this would also
> explain why I get reports from users in other countries that they are
> unable to paste text from the Windows clipboard into my software...)
>
--
Best regards
Fikret Hasovic
Posted with XanaNews 1.15.7.4
Yes. VCL is nealy 100% ANSI. CLX is about 20-30% Unicode-Enabled (Delphi6)
Look at the Links to TNT-Controls and ElPack.
Both Support Unicode-Controls and Helper-Functions/Classes to support
Unicode. ElPack does support Unicode unter Win9x-2003 and
enhanced-controls. We use this controls to enhance our applicaton to
support unicode with only minor problems.
I also found a quick work around to the immediate problem - by using the
Utf8Decode and Utf8Encode functions I can store and retrieve the widestrings
to/from an ordinary (Ansi) TStringlist without losing any information.
That's saved me from having to rewrite a lot of existing code (for now).
Regards,
Adlib
"Bernhard Geyer" <Bernhar...@gmx.de> wrote in message
news:3fb1...@newsgroups.borland.com...
Version: 6.0.538 / Virus Database: 333 - Release Date: 11/11/2003
"Adlib" <nos...@nospam.nospam> wrote in message news:<3fb176c1$1...@newsgroups.borland.com>...