Porting from Microsoft studio VC ++ to Linux
How transfer cpp file with const string international characters in C from Microsoft Studio to Linux. Let say that I have a file with international latin1 characters. Let say that I have transferred file to UTF-8 and then to Linux...
Do I need to perform command: dos2unix mzCfile.cpp? On my utf-8 cpp file? Because my file is in UTF-8, do I need this command I know that in MS VC++ File-Advanced Save with "Line endings" as an option to choose UNIX(LF). When I did it on MS VC++ side, my cpp utf-8 file looks as it is written in only one line? International characters looks good... What I want is to have file I could do cat command and see string of international charaters as it should be and then compile it and run... |
Quote:
The UTF-8 encoded stuff should be left alone because Linux supports UTF-8. |
Converting line-ends from CRLF to LF is trivial.
Migrating programs between platforms is not always impossible, but always tricky. Converting programs from ISO-8859-1 to UTF-8 can be problematic, trivial example: Code:
fputc (stdout, 'ő'); // works in iso-8859-2 |
... and, so far as I recall, the gcc compiler suite is already savvy about source-code line endings . . .
|
Encodings, on the other hand, might cause problems with gcc. If the original source is in windows-1252, then I suggest not to convert it right now, instead use gcc with these options: -finput-charset=windows-1252 -fexec-charset=windows-1252
|
All times are GMT -5. The time now is 03:47 PM. |