I have a problem with Windows new line characters being introduced into text files on Eclipse SFTP synchronization (via JCraft's SFTP plugin).
I've set "New text file line delimiter" to Unix and have even sanitized the file with "fromdos" but every time I upload using the SFTP plugin, Windows new line characters can be seen in the remote file as "^M" characters (when viewed in vi).
A point to note is that if I upload using an external SFTP client, it's all fine.
Eclipse Version: PDT (Helios)
SFTP: jcraft sftp plugin
Local Environment: Ubuntu 10.04
Remote Environments: FreeBSD 6.4, Debian 4.0What am I missing?
2 Answers
This is a behavior of the JCraft plugin. You should probably contact JCraft support about it, but you might try adding the line.separator property to your <eclipse_dir>\configuration\config.ini and setting it to LF.
The only workaround I’ve found (which is usable but not entirely satisfactory) is if I add the following:
/Preferences/Team/File Content/ * Name/Extension: *.php * Content: Binary 2