0

I have NSString with text(Ukrainian language). Then I print it in log. Everything is ok. Then I add this string to NSMutableArray and then I print in log that array. And when this string prints as part of array it changes its coding and I get a set of symbols without sense(with english text everything is ok).

My code is the following:

    NSLog(@"%@",newString);
    [materials addObject:newString];
    NSLog(@"%@",materials);

But in log I have:

2015-08-13 16:19:46.689 ShopIC[343:29722] Хлопок.80
2015-08-13 16:19:46.689 ShopIC[343:29722] (
    "\U0425\U043b\U043e\U043f\U043e\U043a.80"
)

How is it possible to solve?

Yuri Chukhlib
  • 120
  • 11
  • Try this: NSLog(@"%@", [NSString stringWithFormat:@"%@", [materials objectAtIndex:0]] ); – Ben Aug 13 '15 at 13:25
  • (see if it's still doing it after being put back to object type NSString) – Ben Aug 13 '15 at 13:25
  • @Ben yes, now it's working!) Thank you a lot, I have to study stronger...Maybe it would be better to delete this question, because it was duplicated? – Yuri Chukhlib Aug 13 '15 at 13:32
  • nah, it's fine, someone might use the same wording as you :) – Ben Aug 13 '15 at 13:39

0 Answers0