purpose of "replace space with "+"

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
dimen426GA1Hmj
Posts: 16
Joined: Thu Dec 08, 2011 12:20 pm

purpose of "replace space with "+"

Post by dimen426GA1Hmj » Sun Jul 24, 2016 12:21 am

What is the purpose of the line "replace space with "+" in tDataToPost"?
What I know:
If I remarked "--" the line (or removed the line) the message appears to be exactly the same, no change in appearance.
If I put another symbol such as a minus sign "-" then it will appear where the space is supposed to be.
If there is a "+" in the message the "+" will be replaced by a space " ".
Why was this included in the code?

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

Re: purpose of "replace space with "+"

Post by Simon » Sun Jul 24, 2016 1:28 am

Hi dimen426GA1Hmj,
It's called URL encoding.

If I type "LiveCode Forums" into a google search the address bar shows
https://www.google.com/search?q=LiveCode+Forums

Simon
Edit I should say a bit more
If I type "LiveCode Forum's" I get
https://www.google.com/search?q=LiveCode+Forum%27s
The apostrophe becomes %27

Here is a full explanation;
http://www.url-encode-decode.com/
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dimen426GA1Hmj
Posts: 16
Joined: Thu Dec 08, 2011 12:20 pm

Re: purpose of "replace space with "+"

Post by dimen426GA1Hmj » Sun Jul 24, 2016 5:55 am

For some reason if I remove that line of code "replace space with..." it still behaves the same way.
I also tried special characters such as ! or ' in the sent messages and it still behaves the same way.
I was wondering if this is a requirement for pre-Livecode 8?

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

Re: purpose of "replace space with "+"

Post by Simon » Sun Jul 24, 2016 6:06 am

Would be cool if that is now all taken care of in LC 8.
There have been many changes.

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

dimen426GA1Hmj
Posts: 16
Joined: Thu Dec 08, 2011 12:20 pm

Re: purpose of "replace space with "+"

Post by dimen426GA1Hmj » Sun Jul 24, 2016 6:37 am

thanks for responding so quickly, I am soooo excited to learn livecode!!

Post Reply

Return to “Simple Messages”