Post by Patrick WunderlichPost by Wade ChandlerWhat type of program are they using that is not able to view the files
correctly? Wordpad/Write.exe even views \n correctly. About the only
things that don't are crap text editors and notepad. For a pure text
editor I use Textpad on windows and Kate on linux.
There are plenty of ways to end up in this situation - being emailed a
file from a different system, restoring a backup of sources from, say, a
mac on a windows machine, etc. Doesn't happen often, but it does happen.
Post by Patrick WunderlichLong ago when i used windows i also used a good editor like ultraedit.
But some persons use windows and only the stupid notepad :(
Post by Wade Chandler-J-Dline.separator=\r\n
I tried that, but it did not work :(
E.g. in jedit there is an option to set the line separator?!
Why not in Netbeans?
I can't answer that, but I do have a feeling such a setting might cause
more problems than solutions - easy to set and forget, and there are
lots of tools (CVS, archiving utilities, etc.) which will make
assumptions about the line separator based on the platform - assumptions
that would be wrong in the case that an IDE was intentionally setting
the line separators to something other than the platform default (not to
mention that an IDE making wholesale changes to every line of a file
just because it was opened could cause serious wreckage, or at least
make a mess out of what someone was committing into version control).
There are quite a few of command line utilities which do this sort of
conversion. One a lot of people are quite likely to have is zip/unzip:
unzip -a auto-convert any text files
unzip -aa treat ALL files as text
So if you have a large number of files with this problem, the simplest
solution may just be to zip them on the command line and unzip them with
one or both of the above arguments.
-Tim