Page 1 of 1

charset=iso-8859-1

Posted: 2024-09-18 01:51:51
by fulvio53s03
In this page: http://www.mondourania.com/Urania/u841- ... nia853.htm my code:

Code: Select all

  ComicURL := 'http://www.mondourania.com/Urania/u841-860/urania853.htm';  
  Page := GetPage(ComicURL);
  CharAbNormal := '<TR>';
  CharNormal := '<tr>';
  StringReplace(Page, CharAbNormal, CharNormal);
has no effects.
I think that charset iso-8859-1 specified in html page could be the problem.
Am I right or my code is wrong?
what can I do?
Thanks. :)

Re: charset=iso-8859-1

Posted: 2024-09-18 07:13:39
by antp
iso-8859-1 is the closest to Windows-1252, which is the character set AMC uses if you have a Windows configured for a west-european language.
So that encoding is fine for use in scripts.
But the last line should be:
Page := StringReplace(Page, CharAbNormal, CharNormal);
StringReplace does not modify the variable: it returns a new value

Re: charset=iso-8859-1

Posted: 2024-09-18 14:04:29
by fulvio53s03
antp wrote: 2024-09-18 07:13:39 ... But the last line should be:
Page := StringReplace(Page, CharAbNormal, CharNormal); ...
oh, noooo!
Fulvio, you must write 100 times:
Never write scripts before 5 A.M.!
Never write scripts before 5 A.M.!
Never write scripts before 5 A.M.!
Never write scripts before 5 A.M.!
...
...
Never write scripts before 5 A.M.!
:google :stupid: