Re: How to convert an NSString to

2013-08-07 Thread Tom Davie
On 7 Aug 2013, at 09:24, Igor Elland 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 > re

Re: How to convert an NSString to

2013-08-07 Thread Igor Elland
> 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 teilneh

Re: How to convert an NSString to

2013-08-07 Thread Tamas Nagy
Or if you just want to convert the spaces: string = [@"Ich möchte am Wettbewerb teilnehmen" stringByReplacingOccurrencesOfString:@" " withString:@"%20"]; On Aug 7, 2013, at 9:19 AM, Igor Elland wrote: > Hi, > > Have you tried: > > [@"Ich möchte am Wettbewerb teilnehmen" > stringByAdding

Re: How to convert an NSString to

2013-08-07 Thread Igor Elland
Hi, Have you tried: [@"Ich möchte am Wettbewerb teilnehmen" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; Granted, this will also replace the ö with its percent escaped variant, which you probably want anyway. Best, Igor Elland On Aug 6, 2013, at 1:45 PM, Ronald Hofmann

How to convert an NSString to

2013-08-07 Thread Ronald Hofmann
Hi all, I need to convert a normal: NSString * string = @"Ich möchte am Wettbewerb teilnehmen" to something like this: NSString * string = @"Ich%20möchte%20am%20Wettbewerb%20teilnehmen" I don´t want to do this manually. Any clues how to do it with Objective-C ? Greetings from Switzerland, Ron