Retrieving text with accents

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 672
Joined: Tue Jul 29, 2014 12:52 am

Retrieving text with accents

Post by simon.schvartzman »

Hi, I'm using Google Places API in my App and the JSON answer includes accents (I live in a portuguese speaking country), the problem I'm facing is that the response gets unformatted when "enters" the LC environment...

To better explain myself this is the response when the request is submitted from the browser:
browser.jpg
And this is when I submit using put URL in LC and show the result in a List Field.
lc.jpg
How should I deal with it in order to get the same result in LC?

Help would be appreciated.
Simon
________________________________________
To "AI", or not to "AI", that is the question
matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 195
Joined: Sat Apr 08, 2006 7:55 am
Contact:

Re: Retrieving text with accents

Post by matthiasr »

You could try to use textdecode() function to convert the complete response.

It tried just with only S√£o Paulo.

Put textdecode("S√£o Paulo","UTF-8") returns the correct spelling.

Matthias
simon.schvartzman
Posts: 672
Joined: Tue Jul 29, 2014 12:52 am

Re: Retrieving text with accents

Post by simon.schvartzman »

Matthias, thank you very much for your input, it worked fine.

Regards
Simon
________________________________________
To "AI", or not to "AI", that is the question
Post Reply