Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does eclipse on windows add Control M characters

Tags:

eclipse

I am trying to determine if Eclipse on Windows add control-M characters. I have not seen any setting for it in Preferences->Text Editors. If I don't see Control M characters using vi -b on Linux, can I conclude that control-M characters are not present when using eclipse on Windows?

like image 305
doon Avatar asked Dec 19 '11 14:12

doon


2 Answers

I finally found under Window > Preferences > General > Workspace the next text file line delimiter preference. Default is the delimiter of the OS you are using Eclipse on, but you can change that.

Preference for text file line delimiter

That means that when you now change a file (coming from Linux) under Windows, and you have not changed the default, the line end convention (of the existing file) will be kept (New text file line delimiter), but if you create a new file, the convention of your current OS (Windows) will be used.

like image 190
mliebelt Avatar answered Oct 02 '22 12:10

mliebelt


You can change line delimiters for all existing files for a project by selecting the project and got to File-->Convert Line Delimiters To-->Unix.

This will modify line delimiter for all files under the project. This will solve the issue.

like image 39
Jinesh Mathew Avatar answered Oct 02 '22 11:10

Jinesh Mathew