On 7 Aug 2013, at 09:24, Igor Elland <igor.ell...@me.com> wrote:

>> 
>> Or if you just want to convert the spaces: string =  [@"Ich möchte am 
>> Wettbewerb teilnehmen"  stringByReplacingOccurrencesOfString:@" " 
>> withString:@"%20”];
> 
> Please avoid using that, if you really need **only** white space to be 
> replaced, you want to use [@"Ich möchte am Wettbewerb teilnehmen" 
> stringByReplacingCharactersInSet:[NSCharacterSet whitespaceCharacterSet] 
> withString:@"%20”] instead, as there are different UTF-8 characters for 
> different kinds of whitespace.

This is incorrect.  %20 is specifically for representing the 0x20th Unicode 
character – that is “space”.  It is not for representing other whitespace 
characters like tab (%09) etc.

Tom Davie

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to