Re: Question about NSString stringByAddingPercentEscapesUsingEncoding:
Re: Question about NSString stringByAddingPercentEscapesUsingEncoding:
- Subject: Re: Question about NSString stringByAddingPercentEscapesUsingEncoding:
- From: John Stiles <email@hidden>
- Date: Mon, 13 Nov 2006 15:07:24 -0800
The docs say
Returns nil if encoding cannot encode a particular character
And ASCII cannot represent é.
You will need to specify Latin-1, or MacRoman, or UTF8, etc.
On Nov 13, 2006, at 2:52 PM, Nicolas Seriot wrote:
Hello,
Consider the following code:
NSLog(@"nonEscapedString %@", nonEscapedString);
NSString *escapedString = [nonEscapedString
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSLog(@"escapedString %@", escapedString);
I get:
nonEscapedString é
nonEscapedString (null)
Where I expect:
nonEscapedString é
nonEscapedString é
(see http://www.w3schools.com/tags/ref_urlencode.asp )
Do I misunderstand the method?
How can I transform "é" into "é"?
Thank you,
--
Nicolas Seriot _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden