accents, graves & other funny charecters...

John Dixon DixonJA at hotmail.co.uk
Sat Apr 15 13:37:12 EDT 2017


Hi Colin & Matthias...


Klaus solved it with this oneliner...

put textdecode(theAddress,"utf-8") into fld 1

which works for me with the addresses that are being thrown back at me from google...


Dixie



________________________________
From: use-livecode <use-livecode-bounces at lists.runrev.com> on behalf of Matthias Rebbe via use-livecode <use-livecode at lists.runrev.com>
Sent: 15 April 2017 18:23
To: How to use LiveCode
Cc: Matthias Rebbe
Subject: Re: accents, graves & other funny charecters...


I´ve entered the following text

Route Forestière de la Réserve, 50680 Cerisy-la-Forêt, France

into Ultraedit and set the encoding to UTF-8 i get this here

Route Forestière de la Réserve, 50680 Cerisy-la-Forêt, France

, which is the correct spelling then.

It seems your text is in MacRoman and needs to be converter to UTF-8 to get it displayed correctly.

But don´t ask me how.., i´ve always problems when it comes to encoding. ;)




Matthias Rebbe
Bramkampsieke 13
32312 Lübbecke
Tel     +49 5741 310000
         +49 160 5504462
Fax: +49 5741 310002
eMail: matthias at m-r-d.de <mailto:matthias at m-r-d.de>

BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
> Am 15.04.2017 um 18:52 schrieb John Dixon via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
>
> I always struggle with , or I should say with how liveCode and unicode interact and how many times it changes about hoow to use it as always left me confused...
>
>
> Now, in fld "coord", I have ... 49.196839,-0.907385
>
> I throw this at google and it returns the address...
>
> Route Forestière de la Réserve, 50680 Cerisy-la-Forêt, France,
>
> Can someone please show me, tell me... even shout at me ... what do I need to do to sort out these 'funny charecters' ?
>
>
> on mouseUp
>
> put "http://maps.googleapis.com/maps/api/geocode/json?latlng=<coord>&sensor=true <http://maps.googleapis.com/maps/api/geocode/json?latlng=%3Ccoord%3E&sensor=true>" into theURL
>
> replace "<coord>" with fld "coord" in theURL
>
> put URL theURL into temp
>
> put lineOffset("formatted_address",temp) into red
>
> set itemdel to ":"
>
> put item 2 of line red of temp into theAddress
>
> replace quote with empty in theAddress
>
> delete char 1 of theAddress
>
> put boo into fld 1
>
> end mouseUp
>
>
> dixie
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list