Page 1 of 1

myself vs utf-8

Posted: Mon Apr 02, 2012 10:37 pm
by tzenobite
there's a way to get a webpage's content (with "get URL" etc) without have to fight against html codes like ! or ’" or ì ? :shock:
i'm building a sort of ereader for a website, i get the stories reading html pages from the site (with "get URL" as i said), then i strip all the useless code and tags, but i still have a text full of codes where i will have " or è or ! or …, etc
it's possible to automatically "decode" the page (stripped of all the tags) without have to

Code: Select all

replace "√†" with "à"
and so on?
thanks

Re: myself vs utf-8

Posted: Tue Apr 03, 2012 9:44 am
by Mark
Hi ...,

Before you process the text, you need to convert it from UTF8 to plain text:

Code: Select all

put url "http://some.utf8text.xyz" into myData
put unidecode(uniencode(myData,"UTF8")) into myData
-- now you can process the data
Kind regards,

Mark

Re: myself vs utf-8

Posted: Tue Apr 03, 2012 6:48 pm
by tzenobite
wow, it works incredibly fast, thanks :-)

Re: myself vs utf-8

Posted: Tue Mar 05, 2013 7:40 am
by n9yty
This works wonderfully on my Mac, but on the Android (real or emulated) it leaves strange characters.