UrlEncode and ArrayEncode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9817
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: UrlEncode and ArrayEncode
Are you sure the string literal source value is derived from a means that matches the unencode sequence?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: UrlEncode and ArrayEncode
Yes. Look at this:
Code: Select all
on mouseUp pMouseButton
put "asino" into TheData["uno"]
put base64encode(arrayEncode(TheData)) into TheData
breakpoint
put arrayDecode(base64decode(TheData)) into TheResult
put (TheResult is an array) into msg ---YES, it's a bird
breakpoint
put arrayDecode(base64decode(TheData)) into Thedata
put (Thedata is an array) into msg ---------------------------NOOOOO, it's Superman
breakpoint --breakpoint will not work (bug 9552)
end mouseUp
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 7222
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: UrlEncode and ArrayEncode
This works fine for me, I get "true" for both tests, and the last breakpoint also works. This is on LC 9.0 (stable) on OS X.trevix wrote: ↑Sun Jun 10, 2018 11:57 amYes. Look at this:
Code: Select all
on mouseUp pMouseButton put "asino" into TheData["uno"] put base64encode(arrayEncode(TheData)) into TheData breakpoint put arrayDecode(base64decode(TheData)) into TheResult put (TheResult is an array) into msg ---YES, it's a bird breakpoint put arrayDecode(base64decode(TheData)) into Thedata put (Thedata is an array) into msg ---------------------------NOOOOO, it's Superman breakpoint --breakpoint will not work (bug 9552) end mouseUp
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: UrlEncode and ArrayEncode
I just tested the code in 8.1.9 and 9.0 and always got "true" (all 3 on the first one, 2 on the second one)
I tested on Win10.
Code: Select all
put "Bg0AAAABAAN1bm8GAAVhc2lubw==" into TheData -- first one
put "asino" into TheData["uno"] -- second one
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: UrlEncode and ArrayEncode
I don't understand.
The same thing that yesterday did not work, today works for me to...
I must say that it is not the first time for me that changing var name solve some impasse.
The same thing that yesterday did not work, today works for me to...
I must say that it is not the first time for me that changing var name solve some impasse.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>