Unicode Problem?

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
dot
Posts: 1
Joined: Wed Apr 06, 2011 10:08 am

Unicode Problem?

Post by dot » Wed Apr 06, 2011 10:40 am

Hi guys, I'm submitting a form via a LiveCode app but I'm having trouble with sending the fields because of unicode.

For example there is a field called username, and the username is Some.body™. I have encoded the form via libURLFormData but the end result, the username goes to be like Some.body%99 but when I try to debug it in a browser, what the browser sends is like this Some.body%E2%84%A2... So in short let me put some short example below.

Encoded string LiveCode sends: Some.body%99 = Rejected by remote server.
Encoded string that browser sends: Some.body%E2%84%A2 = Accepted by remote server.

So I want it to be like the one browser sends but I don't know how. :(

Sorry for the english, I'm not really good with english.

UPDATE:
Okay, I got it to work by using

Code: Select all

uniDecode(the unicodeText of fld "username","utf8")
however, now I have a new problem, when the server responds, how do I convert it back to Some.body™? Because the result of the unicode thing is Some.bodyâ„¢. I don't see any way of returning it back to Some.body™. Help please?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Unicode Problem?

Post by Mark » Wed Apr 20, 2011 9:26 am

Dot,

It looks like your server is having a problem. What exactly are you doing on the server side?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply