Hi,
I'm having trouble with other tools (e.g. cvs) thinking
that the whole file has been changed after saving the
file with KDiff3. We standardized on unix line feeds for
all text files in our work, regardless of platform. If KDiff3
is used on a Windows platform, it will convert all the line
endings to DOS style lines.
Please allow the user to choose between:
- unix line endings
- windows line endings
- mac line endings
- preserve line endings
Thanks for the great tool.
Logged In: YES
user_id=584435
Please specify "mac line endings" (just '\r'?)
"Preserve line endings" is ambiguous if two or three input files have
different line-endings. What should be done then?
Logged In: YES
user_id=473331
Hi,
Traditionally, Mac line endings are just '\r'.
Mac OS X makes the distinction a bit blurry, because unix and
Mac applications run together. I would avoid calling '\r' an OS
X line ending (calling it "Mac" or "Mac OS" is correct).
If you felt like it, you could mention the characters, e.g.:
- unix line endings ('\n')
- windows line endings ('\r\n')
- Mac OS line endings ('\r')
- preserve line endings
On preserve line endings:
You may want to move this to a separate feture request so
that this one can be fixed/closed (getting the other three
options is plenty for a feature request IMO).
It's hard for me to make sense of preserve line endings
without [A] having them all be the same and not really have
to worry about it; or [B] considering lines with different
endings as being different.
I was going to suggest that the menu item refer to using
the line endings from file 1, for example; but even that would
only work most of the time. It is possible to get files with
mixed line endings within the same file (one could argue that
that would be a screwed up file, but sometimes I'm doing diffs
on files because some file is screwed up and I'm trying to
figure out which one and what the trouble is -- getting a file
with mixed line endings happens to me about once every two
years and really trips me up when it happens).
Maybe asking for preserve line endings implies comparing the
line endings too. That seems a little rough to convey in the
user interface though.
90% of what I need is in the unix/windows/mac options, the
preserve option is a "nice to have".
Thanks for asking.
Logged In: YES
user_id=584435
KDiff3 0.9.82 has an option "Editor"->"Line End Style" that allows to
select DOS or Unix line ends while saving.
I didn't yet implement Mac-line ends yet, because KDiff3 currently
can't read such files and nobody ever complained about that. I'll fix
that in a future release.
As you point out, preserve line ends for saving would be difficult,
because its not a clear cut choice. For comparing there is the Diff &
Merge option "Preserve Carriage Return". I think this should cover
the other problem you had.
Hence I consider this wish fulfilled.