Re: Line ending issues, portability, Project Builder, FileMerger and more...
Re: Line ending issues, portability, Project Builder, FileMerger and more...
- Subject: Re: Line ending issues, portability, Project Builder, FileMerger and more...
- From: Douglas Davidson <email@hidden>
- Date: Wed, 5 Feb 2003 12:20:43 -0800
On Wednesday, February 5, 2003, at 03:47 AM, Pierre-Olivier Latour
wrote:
I first discovered a serious bug in FileMerger where file comparison is
completely not working when comparing files with mac line endings
(basically, just change 1 thing, and the whole file is going to be
considered changed).
Then I wondered about how PB handles these issues... Is it really
fail-proof? For example when pasting text from a mac file into a unix
file?
I've noticed several times than when I type return on my keyboard while
editing a source file in PB, nothing happens (the cursor doesn't
move), and
I have to type return again to make it move to the next line. I assume
this
happens now and then on mac-line endings files.
FileMerge is based on diff, which I believe only understands Unix line
breaks. You can add filters to FileMerge, so you might be able to set
something up that way that would standardize line endings. There are
plenty of tools that can do this, e.g. tr.
PB's use of line breaks should be determined by its preferences; you
may need to play around with it a bit to figure out what it does in all
cases. If you hit return and nothing happens, it may be that you were
just after a CR and inserted a LF, producing a CR-LF combination--which
is treated as a single line break rather than two because of the
Windows convention. You may wish to standardize line endings on all
your files ahead of time or every now and then to avoid these sorts of
problems.
Douglas Davidson
_______________________________________________
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.