• 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: string encoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: string encoding


  • Subject: RE: string encoding
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Fri, 6 Jun 2003 09:58:22 -0400

You also might consider using NSString's -writeToFile:atomically: to write
the string and +stringWithContentsOfFile: or -initWithContentsOfFile: to
read the string. The string is written in the default C string encoding if
no information would be lost. Otherwise, it's written in Unicode encoding.
This is more or less the "default" encoding style in Cocoa.

Jonathan



> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of Lloyd Dupont
> Sent: Thursday, June 05, 2003 9:13 PM
> To: email@hidden
> Subject: string encoding
>
>
> I'm about to write NSString(s) into a file.
> I wondered about the most proper way ...
>
>
> Anyway, I choose to use NSFileHandle, and use multiple call to
> writeData:
> now I have an other problem.
> I wonder which encoding choose to write my string.
> I see the NSString class gaves me the fastestEncoding, smallestEncoding
> and the defaultCStringEncoding which look interesting.
> I wonder if there is a defaultMacEncoding ?
> what would you advise me ?
> in case of doubt I will choose NSMacOSRomanStringEncoding
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >string encoding (From: Lloyd Dupont <email@hidden>)

  • Prev by Date: System independent networking for cocoa apps?
  • Next by Date: Re: Equivalent to Windows API 'GetUserName()'
  • Previous by thread: Re: string encoding
  • Next by thread: Re: Comments & Documentation (was Re: semantics of init)
  • Index(es):
    • Date
    • Thread