Format Accented Characters for URL?

Scott Rossi scott at tactilemedia.com
Tue Sep 25 16:29:18 EDT 2012


Hi List:

Wondering if someone has a suggestion for URL character formatting in LCŠ

I'm trying to format a URL string to submit to Google Maps.  The string is a
street address that needs to be delimited using "+".  The complication
arises when an address contains an accented character like ñ (n + tilde).
If I change the ñ to a roman n, the address is processed, but I thought I
could use something like urlEncode to handle problem characters.

If I urlEncode the entire string, Google rejects it.  If I manually delimit
the urlEncoded string with "+", Google rejects it.  urlEncode replaces
everything in the string, including punctuation, with encoded versions, and
it seems that Google wants these characters unencoded in the string.

Is there some simple way to handle this without resorting to a character
table?  It seems I either have to maintain a table of accented characters or
a table of punctuation and symbols to swap in the URL.  Perhaps someone
already has a routine for formatting addresses with accented characters for
a URL, or maybe there's a better way to format the string?

Thanks for any suggestions/pointers.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design





More information about the use-livecode mailing list