UTF-8 problems with POST

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

UTF-8 problems with POST

Post by croivo » Sat Feb 06, 2016 3:34 pm

Hello...
I'm having troubles using "POST" command in my app. I have php script online, and when I send some parameters with 'POST', and put the result into my variable, I get text full of weird characters (for example, chars like č ć ž š đ are not showed).

However, If I just use command "put myLink into myVariable", all characters are perfect.

Thank you!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: UTF-8 problems with POST

Post by jacque » Sun Feb 07, 2016 5:14 pm

When sending text out of LC, convert it to UTF8 first with the textEncode function. The reverse is true when getting text from external sources, use textDecode to convert to LC native text.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

croivo
Posts: 111
Joined: Wed Feb 26, 2014 11:02 pm

Re: UTF-8 problems with POST

Post by croivo » Mon Feb 08, 2016 12:28 am

I managed to get it working somehow with uniencode functions...

Post Reply