PercentEncoder
PercentEncoder copied to clipboard
Nice library, but maybe there is a little error in ReadMe
Nice library, but maybe there is a little error in ReadMe
NSString.stringByAddingPercentEncodingWithAllowedCharacters() is introduced from iOS 7. However it won't work in multi-byte languages like Japanes, Chinese, etc and an app crashes as shown at the issue in Alamorefire.
Actually,
"东京".stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())
will return "%E4%B8%9C%E4%BA%AC", this is the correct url encoded string.
stringByAddingPercentEncodingWithAllowedCharacters() maybe has memory issues, but i think it can work with multi-byte languages like Japanes, Chinese, etc.