iOS Question StringsUtil UTF-8 Encoding/Decoding

iCAB

Well-Known Member
Licensed User
Longtime User
Hi All

I am using the following code to encode/decode messages sent/received by the app.

The code works perfectly ok with B4A, but not with B4I
The issue is more apparent when a message sent from B4A to B4I.

B4X:
su.EncodeUrl(Parameters(i), "UTF8")

below is the code I am using to decode
B4X:
#if B4A
    TLocalPS.Command = su.DecodeUrl(Message.GetData.Get("body"), "UTF8")
#else   
    TLocalPS.Command = su.DecodeUrl(Message.Get("body"), "UTF8")
#end if


with B4I I am left with unwanted characters, so I find myself having to call this after the executing the above code.
B4X:
CleanedMessage = CleanedMessage.Replace("%40", "@").Replace("%2C", ",").Replace("+", " ").Replace("%2F", "/").Replace("%3A", ":").Replace("%20", " ")

is there a cleaner way of doing this?

Thanks
iCAB
 

iCAB

Well-Known Member
Licensed User
Longtime User
What does the string look like before you decode it and after (in your iOS applicatoin)?
Sorry my stupid mistake, I just double checked, and Yes Erel is right
Sorry for the confusion/. This what happens when you try to handle 100 tasks at the same time
My apologies
 
Upvote 0
Top