php equivalent of percent escape + UTF8
Posted: Sun Aug 02, 2009 11:40 pm
Hello,
I have an iphone app which uses a website of mine.
In iphone I convert a search query into
[search_Query.text stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]
Following is the declaration of stringByAdding.....
Anyway, my question is, is there a way to convert a php string into a string with Percent Escapes using UTF8 encoding
I have an iphone app which uses a website of mine.
In iphone I convert a search query into
[search_Query.text stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]
Following is the declaration of stringByAdding.....
and the NSUTF8stringEncdoing is the Mac/obj-c equivalent of UTF8stringencoding I believe.Returns a representation of the receiver using a given encoding to determine the percent escapes necessary to convert the receiver into a legal URL string.
- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)encoding
Parameters
encoding
The encoding to use for the returned string.
Return Value
A representation of the receiver using encoding to determine the percent escapes necessary to convert the receiver into a legal URL string. Returns nil if encoding cannot encode a particular character
Anyway, my question is, is there a way to convert a php string into a string with Percent Escapes using UTF8 encoding