• 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
Outputting text to a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Outputting text to a file


  • Subject: Outputting text to a file
  • From: Simone Manganelli <email@hidden>
  • Date: Sat, 12 Apr 2003 03:55:14 -0700

I have another quick question on something I'm not familiar with.

I want to output some strings that I generate with my program to a text file, that is actually going to be an HTML file (since only the extension is different). I am using NSString to convert the contents to an NSData object, and then using the NSData methods to write that out to file.

The problem is that it seems that any encoding I use introduces a bunch of extra text in the middle -- browsers recognize and display the file correctly, but when I view it in the source editor in OmniWeb, for example, the text is all spaced out and it doesn't look like a normal HTML file.

Am I doing something wrong, or is there a better way to output raw text to a file with no encoding whatsoever?

-- Simone Manganelli
_______________________________________________
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.

  • Prev by Date: Accessibility APIs & custom views
  • Next by Date: Re: Look at NSData
  • Previous by thread: Accessibility APIs & custom views
  • Next by thread: How to clear an NSImage
  • Index(es):
    • Date
    • Thread