Monday, December 30, 2013

NSString conversion anxious. . . .

I passed stringByAddingPercentEscapesUsingEncoding: CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingGB_18030_2000) put a NSString into a legitimate URL string (can be used as a parameter to the URL address of the server request parameters or to update the server database information)

But how can I put this url string to convert it into the original? (The original NSString is Chinese)
Reply:
Do not understand what you say.
The URL String NSString turn into not just the coding can be changed, the key is that some characters can not appear in a URL, Google's GTM library has some class-related, you look up.
Reply:
The string can be converted to char * char * and then from the construction of a new NSString
Reply:
NSURL of

- (NSString *) absoluteString
Reply:
To convert to UTF-8 format to display the correct translation of the.

No comments:

Post a Comment