0

I have an NSMutableArray miniResults which contains the following NSStrings.

List 1, Some strings have German umlauts.
enter image description here

After putting miniResults into NSString solution with this:

solution    = [NSString stringWithFormat:@"%@",miniResults];

solution contains converted strings what I don´t want.

List 2, All umlauts converted!
enter image description here

I don´t see why this happens.
What am I doing wrong?

Any ideas?

Ronald Hofmann
  • 1,390
  • 2
  • 15
  • 26

1 Answers1

0

The compiler seems to escape them to unicode. Shouldn't be a problem anyfurther. I've got no sources for this, but it looks like that.

One possible fast solution would be substituting them. Make "Ae" from "Ä", etc.

rimrul
  • 141
  • 7
  • Yes, but I don´t want to to do this. I would like to understand why this happens. – Ronald Hofmann Aug 17 '13 at 04:28
  • This happens because they are non-ascii characters. [http://en.wikipedia.org/wiki/Character_encoding](http://en.wikipedia.org/wiki/Character_encoding) – rimrul Aug 17 '13 at 04:36
  • It might also have historical reasons as the 3rd comment on the first answer on [this post](http://stackoverflow.com/questions/833822/how-do-i-escape-a-unicode-character-in-my-objective-c-source-code) mentions. – rimrul Aug 17 '13 at 04:40
  • I don´t see this. At the moment I´m filling these strings into an NSString instead into an NSMutableArray: gesamtString =[NSString stringWithFormat:@"%@\n%@",gesamtString, theLineString]; And this does´t change the umlauts. – Ronald Hofmann Aug 17 '13 at 06:45
  • Well, seems I'm out here. This is a job for those apple nerds out there. Objective-C is a weird language to me at all. Sorry for being not helpfull. – rimrul Aug 17 '13 at 07:18