Page 1 of 1

purpose of "replace space with "+"

Posted: Sun Jul 24, 2016 12:21 am
by dimen426GA1Hmj
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?

Re: purpose of "replace space with "+"

Posted: Sun Jul 24, 2016 1:28 am
by Simon
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/

Re: purpose of "replace space with "+"

Posted: Sun Jul 24, 2016 5:55 am
by dimen426GA1Hmj
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?

Re: purpose of "replace space with "+"

Posted: Sun Jul 24, 2016 6:06 am
by Simon
Would be cool if that is now all taken care of in LC 8.
There have been many changes.

Simon

Re: purpose of "replace space with "+"

Posted: Sun Jul 24, 2016 6:37 am
by dimen426GA1Hmj
thanks for responding so quickly, I am soooo excited to learn livecode!!