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 159124 - Line ending inconsistency
Summary: Line ending inconsistency
Status: RESOLVED DUPLICATE of bug 72515
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@editor
Depends on:
Reported: 2009-02-25 10:02 UTC by dice
Modified: 2009-03-26 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description dice 2009-02-25 10:02:34 UTC
Netbeans handles line endings differently depending on how a new file is created.

(Using Windows Xp sp3)
- Create a PHP file by File->New File...-> PHP File and the resulting file has Unix line endings.
- Create a blank file and it has Windows line endings.

Netbeans uses the first line to determine the line endings for a document but for new files the line endings should be

Which leads to another problem:
If a file contains a mix of line endings Netbeans will not preserve the original line endings and will overwrite all the
lines with whatever was found on the first line.

Netbeans also does not provide a way to set the line endings for new files (Eclipse does). I use Windows but must work
with Linux as well so want Netbeans to only save with Unix line endings.
Comment 1 Vitezslav Stejskal 2009-03-26 16:40:29 UTC

*** This issue has been marked as a duplicate of 72515 ***