This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 27972 - Text files in UNIX format.
Summary: Text files in UNIX format.
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P2 blocker with 1 vote (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-12 17:31 UTC by Taudo
Modified: 2011-09-05 09:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Taudo 2002-10-12 17:31:25 UTC
When creating any new files (like java classes or XML 
docs) in the Editor from the templates that are contained 
in the distribution, those files are always in UNIX file 
format. This is a big problem, especially if not all 
developers in a team work with netbeans ide. Not al 
editors in a windows environment are able to display UNIX 
formatted textfiles correct.
Comment 1 ehucka 2002-11-06 14:03:48 UTC
Do you have any idea to solve this problem? 
Maybe the installer could rewrite all templates to actual platform
format. But I don't know if it is possible. 
Next, in editor could be some actions to reformat windows/unix and
unix/windows (mac/unix, unix/mac) format.
I think it isn't DEFECT now.
Comment 2 rendog 2003-09-24 06:46:06 UTC
This is a really big problem I have found, but when opening existing 
unix files under windows machines. When I open a java file from a 
unix machine in netbeans every line is separated by a return line for 
example:

blah blah

blah blah

When I open a java file from windows filesystem it opens fine. When I 
save the file with these extra return lines and open the file with a 
text editor, the return lines have been saved. I know this causes no 
problems to the compilation of java files but this is a really 
annoying issue. Is there an option for this or is it a bug in 
netbeans??

simon@ecsi.com.au
Comment 3 Miloslav Metelka 2003-09-24 10:25:17 UTC
This usually happens when the line separators become garbled.
NB editor recognizes the following line separator sequences:
\r - Mac
\n - Unix
\r followed by \n - DOS
If for some reason the file's line separators become garbled the NB
editor will not do any additional heuristics. It will just try to
recognize the above sequences in the text. For example \n followed by
\r would be interpreted as Unix LS followed by Mac LS resulting in an
extra blank line.
Please look at the file contents by using some hex editor. That should
clarify what line separators are present in the file.
 AFAIK the problems can arise when using cvs inappropriately by the
following scenario:
1) Checkout sources on windows (cvs will use \r\n as line endings in
files that were checked out)
2) Move the repository to a unix machine and commit from there
(because of being on unix the cvs will treat the \r as extra
characters that were added to the file).
3) Checkout on windows again - there will likely be \r\r\n line
separators on every line.
Comment 4 screeze 2009-05-21 10:19:42 UTC
I've got Problems with that..
I'm working together with someone else on an PHP Projekt, and the other guy isn't using NetBeans. In all files i
recieve, there are always for every return 2 returns shown in Netbeans. If i edit the files and save themn, they can't
be used on some unix servers, cause every Return is "broken". 
Has anyone an idea, how to fix that? If not I'll have to look for another IDE...