Page 1 of 1

UTF8decode

Posted: 2015-08-21 12:10:19
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.

Posted: 2015-08-21 15:00:12
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.

Posted: 2015-08-21 15:44:20
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.