• 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: Getting TextEdit to Recognise UTF-8 Output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting TextEdit to Recognise UTF-8 Output


  • Subject: Re: Getting TextEdit to Recognise UTF-8 Output
  • From: Gus Mueller <email@hidden>
  • Date: Fri, 21 May 2010 12:48:11 -0700

On May 21, 2010, at 12:42 PM, K.Darcy Otto wrote:

> [textStream appendFormat:@"%C%C%C",0x00EF,0x00BB,0x00BF]; // textStream is an empty NSMutableString that gets added to, and then written to a file


How are you writing the string to a file?  Are you using NSString's writeToFile:atomically:?  I'm pretty sure that doesn't write it out as UTF8.  You'll probably want to use writeToFile:atomically:encoding:error: with NSUTF8StringEncoding as the encoding if you aren't already.

-gus

--

August 'Gus' Mueller
Flying Meat Inc.
http://flyingmeat.com/

_______________________________________________

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

References: 
 >Getting TextEdit to Recognise UTF-8 Output (From: K.Darcy Otto <email@hidden>)

  • Prev by Date: Getting TextEdit to Recognise UTF-8 Output
  • Next by Date: Re: Getting TextEdit to Recognise UTF-8 Output
  • Previous by thread: Getting TextEdit to Recognise UTF-8 Output
  • Next by thread: Re: Getting TextEdit to Recognise UTF-8 Output
  • Index(es):
    • Date
    • Thread