• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSString looses Umlaute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString looses Umlaute


  • Subject: NSString looses Umlaute
  • From: Alexander Reichstadt <email@hidden>
  • Date: Thu, 22 Dec 2011 01:45:42 +0100

Hi,

NSString eats the Umlaute. How do I tell NSString to not do that? I tried:

 	NSString *theContent = [[NSString alloc] initWithData:theData encoding:NSASCIIStringEncoding];
        theContent = [[theContent componentsSeparatedByString:@"\r"] objectAtIndex:1];
        theContent = [theContent stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
        theContent = [theContent stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];



I can even see it handles everything correctly in NSLog, first I see the unicode for an Umlaut, then it converts it to the correct percent value, like like รถ to 94, but when the final NSString is printed to an NSControl, the Umlaute are missing or garbled.

The original file is ascii-encoded.

Thanks
Alex_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSString looses Umlaute
      • From: Joar Wingfors <email@hidden>
    • Re: NSString looses Umlaute
      • From: Ben Kennedy <email@hidden>
  • Prev by Date: Re: Cocoa-dev Digest, Vol 8, Issue 979
  • Next by Date: Re: NSString looses Umlaute
  • Previous by thread: Re: Q: An App for both OS X and iOS
  • Next by thread: Re: NSString looses Umlaute
  • Index(es):
    • Date
    • Thread