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

Summary: Line ending inconsistency
Product: editor Reporter: dice <dice>
Component: -- Other --Assignee: issues@editor <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

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
consistent.

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 ***