简体   繁体   中英

Convert unicode character in Titanium mobile app

I'm calling api calls to google maps, which returns in json, like below:

http://maps.googleapis.com/maps/geo?output=json&q=norreport,%20copenhagen

As you can see Nørreport has ø in it - this works good when calling it through the browser, but calling via the titanium app, the unicode equivalent is returned: N\\U00f6rreport

How can I convert the \\U00f6 into the unicode character? Bearing in mind this in in a Titanium mobile app.

Thanks

Turns out I wasn't included the text correctly, I was using:

json.Placemark[0].AddressDetails.AddressLine

When it should be:

json.Placemark[0].AddressDetails.AddressLine[0]

Conversion is then automatic.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM