Re: UrlEncode and ArrayEncode
Posted: Sun Jun 10, 2018 11:48 am
Are you sure the string literal source value is derived from a means that matches the unencode sequence?
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
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
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
Code: Select all
put "Bg0AAAABAAN1bm8GAAVhc2lubw==" into TheData -- first one
put "asino" into TheData["uno"] -- second one