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

Re: GCC3?


  • Subject: Re: GCC3?
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Mon, 11 Aug 2003 23:20:48 +0200

At 14:49 Uhr -0400 11.08.2003, Sailor Quasar wrote:
Speaking of inconsistencies in line endings, the thread on this list regarding that seems to have left out that point. If you open a file with Windows line endings in TextEdit and add some new lines, don't try to read that file in Windows without first going in with BBEdit or CodeWarrior and manually repairing every line. As far as I can tell, this is a problem endemic to the entire Cocoa text system.

Blaming Cocoa's text system for this is like blaming the police president for your parking tickets.

The actual problem lies with the differing nature of line endings on various platforms. Cocoa is actually doing you a service by correctly displaying text no matter what line endings it uses, be it Unix-style 0x0A, Mac-style 0x0D, or Windows-style 0x0D0A.

The problem is that Cocoa will generate line endings in whatever format the current OS uses natively, which is 0x0D on Mac. Since you didn't convert the text beforehand, you end up with mixed line feeds. Cocoa is guilty merely in that it lets you get away with displaying foreign line endings, and maybe because it doesn't warn you.

Try opening Windows text files in another text editor, like good ol' SimpleText, and you see an alternative approach to the problem: Not handling it at all. SimpleText will simply display all the text on one line. And I think MLTE uses the same approach.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.
  • Follow-Ups:
    • Re: GCC3?
      • From: Douglas Davidson <email@hidden>
References: 
 >Re: GCC3? (From: Sailor Quasar <email@hidden>)

  • Prev by Date: Question about poseAsClass
  • Next by Date: Re: Setting focus to text field in drawer
  • Previous by thread: Re: GCC3?
  • Next by thread: Re: GCC3?
  • Index(es):
    • Date
    • Thread