Accented letters

Monkey Targets Forums/Desktop/Accented letters

cgrossi(Posted April) [#1]
Night, you all!!

I'm build an app with a MySql database and HttpRequest calling a PHP page, but I can't pass words that have accented letters.. When I pass accented letters, they turn into strange characters..

But if I call the PHP page by browser, passing in the parameters accented letters it works fine. Does anyone know why? My database is UTF-8, as my PHP page.


Nobuyuki(Posted April) [#2]
what do these characters look like? What are their codepoints? That will help determine the nature of the issue. Possibly an escaping or encoding issue. Monkey uses UCS2 internally afaik, which use a different type of encoding for surrogate pairs than UTF-8 does.


cgrossi(Posted April) [#3]
Well, I'm from Brazil, here we have accented words like AÇÃO (action), TAMBÉM (also).. The letters (most vowels) are áàâãâçôòó... and so on.. How can I pass then to this Php page correctly by my Monkey app?


Soap(Posted April) [#4]
Use Base64 to encode/decode? Diddy has an implementation https://github.com/swoolcock/diddy/blob/develop/src/diddy/base64.monkey


cgrossi(Posted April) [#5]
I don't use Diddy and I'm not encoding the text..

It's a very simple call:
Mypage.php?parameter=ação

Just that. The characters ç and ã turn into something strange...


secondgear(Posted April) [#6]
You'll probably need to URL-encode your words ( https://en.wikipedia.org/wiki/Percent-encoding ). Your
Mypage.php?parameter=ação
will look like this
Mypage.php?parameter=a%C3%A7%C3%A3o
You can play with this to experiment http://meyerweb.com/eric/tools/dencoder/

I don't know if there is a Monkey implementation for this.


Soap(Posted April) [#7]
https://github.com/search?p=4&q=url+encoder&type=Repositories&utf8=%E2%9C%93