UTF8decode

If you need help on how to use the program
Post Reply
J
Posts: 224
Joined: 2008-02-17 17:09:26

UTF8decode

Post by J »

hi,

in this particular example after using function utf8decode() the variable is empty. any idea?

Code: Select all

program utf8_test; 

var 
   PageText : string; 

begin 		
		
//		PageText := GetPage('http://www.filmstarts.de/kritiken/225062.html');
		PageText := GetPage('http://www.filmstarts.de/kritiken/198488.html');
		ShowMessage(PageText);
        PageText := UTF8Decode(PageText);
		ShowMessage(PageText);
		
end.
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

That happens when there is an invalid character in the text to decode.
For that reason, it is better to decode individual values before setting them to the fields rather than the whole page.
J
Posts: 224
Joined: 2008-02-17 17:09:26

Post by J »

invalid character, yep that's what I love. :hihi:

As long as this problem is just for one or two movies I'll ignore this. Not sure why I UTF8-decote the whole page at this point, but will keep your recommendation in mind.

thanks
J.
Post Reply