URLEncode question

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Location: USA
Contact:

URLEncode question

Post by reelstuff » Sat Apr 13, 2013 11:28 pm

I was looking over the dictionary for URLEncode("Test string $$") -- returns "Test+string+%24%24"

This code,

Code: Select all

put the text of fld "myTest" into varEncodemessage
put URLEncode (varEncodemessage) into fld "enc_string"
returns, Testing+out+the+URLEncode+function

looking at the dictionary this would appear to be incorrect, but there is not much in the dictionary, perhaps I should try the user manual?
edit, Opps, the user manual states for more information see the dictionary, LOL,

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: URLEncode question

Post by Simon » Sun Apr 14, 2013 3:06 am

reelstuff,
Can't see what is in your fld "myTest" but if it's "Testing out the URLEncode function" then the result is correct. Replace all the spaces with "+".

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Location: USA
Contact:

Re: URLEncode question

Post by reelstuff » Sun Apr 14, 2013 1:05 pm

Thanks Simon, when I was reading the documentation, (which is not the most communicative or instructive documentation) I may have to scrap that function and find another one, I did see another approach that might work better but it builds the form call from the http headers to the body which would make sense in creating a LC version of a simple form where the string is url encoded.

Thanks for your reply, )

Post Reply

Return to “Internet”