During cross-platform development, the biggest headache for developers using different ides is various garbled code problems.
Common ides support UTF-8 encoding and '\ n' at the end of the line in UNIX format '.
1. Set text encoding and line feed in xcode
Xcode> preferences = text editing-Editing:
There are default text encoding and default line endings.
2. Set text encoding and line feed in eclipse
Menu> preferences = General> Workspace-configuration page
There are text file encoding and new text file line delimiter.
3. Visual Studio
No direct handling method found. The following is a compromise.
Tools-> options-> environment-> events-> Save document as Unicode when data cannot be saved in codePage save as Unicode, check
Tools> Options> text editor> General> auto-detect UTF-8 encoding without signature
Open the UTF-8-encoded file and check (Note: xcode saves the text without the encoding mark of the file header, Vs may be garbled when opening these files)
In vs, the original encoding is maintained when the UTF-8 encoded file is opened. Make sure that the new file is UTF-8:
After creating a new file, you can use the advanced save option of the file to specify the UTF-8 encoding and the end of the line.
IDE editor encoding Configuration