Under Window → Preferences:
set Encoding UTF-8: Expand left menu to General → Workspace:
Check
Text file encoding and select:
Other:
UTF-8
Check
New text file line delimiter and select:
Other:
Unix
Ensure that spaces are used instead of tabs: Expand left menu to General → Editors → Text Editors
Removing trailing whitespaces: Click left menu PHP→Editor→Save Actions: check Remove trailing whitespace and select All lines