PDA

View Full Version : encode url string to HEX




arme
Nov 6, 2008, 01:03 AM
i want to send Url with special character (for example space) and i need a function for change a character to hex.



robbieduncan
Nov 6, 2008, 04:12 AM
i want to send Url with special character (for example space) and i need a function for change a character to hex.

Did you look at the NSString documentation? There is a very obvious (http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/stringByAddingPercentEscapesUsingEncoding:) method...