Unicode display in the console in the desired format

NSSet *subFolders = [_account subscribedFolders];
NSLog(@"subFolders: %@",subFolders);

Conclusion:

...
    "[Gmail]/\U05d8\U05d9\U05d5\U05d8\U05d5\U05ea",
    "[Gmail]/\U05d7\U05e9\U05d5\U05d1" 
...

Is there a way to show the above text in the original language (Hebrew)?

Things I tried:

  • debugger change from LLDB to GDB - does not work
  • Mark in settings → Text editing UTF- * selected

thank

+5
source share
2 answers

There is no problem displaying Unicode characters in the console, so I would suggest that the string is included in the set in the first place.

I would suggest repeating all the objects inside the subfolders with something like:

 for( id object in [subFolders allObjects] ) {
    //Print out the name of the item explicitly
 }

Even if this does not work, it at least allows you to work directly with strings. If it still prints:

"[Gmail] / \ U05d8 \ U05d9 \ U05d5 \ U05d8 \ U05d5 \ U05ea"

, unicode, : fooobar.com/questions/153357/... - NSSet

+2
 NSString* strOld=[NSString stringWithFormat:@"%@",responseObject];
NSLog(@"%@",[NSString
             stringWithCString:[strOld cStringUsingEncoding:NSUTF8StringEncoding]
             encoding:NSNonLossyASCIIStringEncoding]);
+1

All Articles