• 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
NSData to NSString encoding error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSData to NSString encoding error


  • Subject: NSData to NSString encoding error
  • From: Johan Augustsson <email@hidden>
  • Date: Mon, 10 Jul 2006 11:46:38 -0500

Hi

I want to convert an NSData to NSString using NSString's: "initWithData:encoding:";
My data is encoded using latin1


The problem is that my special character Ö (Swedish O with dots) is converted to "\U00d6". I use the encoding:" NSISOLatin1StringEncoding"

What could be wrong here??

My examle:
Description of NSData: "424ad652" The problem is the third byte D6 witch according to latin1 spec should be "Ö"
Description of my created string: "BJ\U00d6R"




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSData to NSString encoding error
      • From: j o a r <email@hidden>
    • Re: NSData to NSString encoding error
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Disable sort in a bound tableview with relationships
  • Next by Date: Re: NSCell mouse tracking best practices.
  • Previous by thread: Re: Disable sort in a bound tableview with relationships
  • Next by thread: Re: NSData to NSString encoding error
  • Index(es):
    • Date
    • Thread