How to get Eclipse source files unix compatible.

Unlike Unix, which uses a bare line feed (\n) to denote the end of a line, Windows uses a carriage return followed by a line feed (\r\n). When present in an interpreter specification, this extra carriage return is a problem, as the robot reads #!/usr/bin/python\r\n, for example, and can’t find the interpreter /usr/bin/python\r ! If your program has an interpreter specification, make sure you convert it to Unix text before submitting. Alternatively, put your code in a file called (for example) hoppity.py and also send a file called hoppity with the contents.
[source]
Discovered the unpleasant Windows new line characters in my source code and wanted to remove the extra \r carriage return at the end of file in order to submit the source code to Facebook Puzzlebot.

Below are the steps to make your source code Puzzlebot compatible.

To set file encoding to UTF-8 and line-endings for new files to Unix, so that text files are saved in a format that is not specific to the Windows OS and most easily shared across heterogeneous developer desktops:

  1. Navigate to the Workspace preferences (General:Workspace)
  2. Change the Text File Encoding to UTF-8

To convert the line endings of an existing file,

  1. open the file in Eclipse and choose File -> Convert Line Delimiters to -> Unix

Comments

Popular posts from this blog

[Azure Websites PHP] Cross Domain request results in blank response page after Preflight HTTP OPTIONS

[Magento] Create Contact Form with Dynamic Recipient