• 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
Re: What is this invisible character?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is this invisible character?


  • Subject: Re: What is this invisible character?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 19 Mar 2008 11:34:25 -0700


On 19 Mar '08, at 10:04 AM, J. Todd Slack wrote:

How do I write an ASCII 254 and ASCII 255 at the beginning of the NSString
that I am putting in the file I want to be read back in at a later date? '

Those wouldn't go into the NSString; they're the byte-order-mark that prefixes the UTF-16 data, not part of the character data itself.


I really recommend you write out the string in UTF-8 instead, as I suggested yesterday (with example code). UTF-8 is the most common modern encoding for text, because (a) it's a superset of ascii, and (b) for Roman alphabets it's up to twice as compact as UTF-16.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: What is this invisible character?
      • From: Deborah Goldsmith <email@hidden>
References: 
 >Re: What is this invisible character? (From: "J. Todd Slack" <email@hidden>)

  • Prev by Date: Re: Network communication with NSFileHandle & NSSocketPort
  • Next by Date: Re: Unable to access an instance properties and methods
  • Previous by thread: Re: What is this invisible character?
  • Next by thread: Re: What is this invisible character?
  • Index(es):
    • Date
    • Thread