How should I decode escaped URL by unity in Swift?
I am developing a game with Unity3d. Something MMORPG. With server implemented by me in
A framework doesn't matter that much. It is more about swift and Unity itself.
Let me describe the problem here.
Escapes string with encoding used in the
application/x-www-form-urlencoded content-type: https://www.w3.org/TR/html401/interact/forms.html#h-220.127.116.11
Which produce string
+ maps to
" " space.
import Foundation var str = "First+Last" print(str) print(str.removingPercentEncoding)
The character used on this string
+ isn't considered as a percentage encoding in the standard used by
swift. It would be if the character escaped as this would be represented by
So my server and client ended up with different string values. Later on returned from one to the other weren't equal. Which ended up considering them as two different clients.