recode -v windows-1252.. foo.hh
or
recode -v windows-1252..latin1 foo.hh
of
recode -v windows-1252..utf8 foo.hh
Any help appreciated!
THX!
Charsets Windows and Linux
Hi!
I am currently developing cross platform because i am a linux addict and my project for a course has to compile on VS .NET 2003.
Now everytime i move my files to windows or back again i get those annoying NULL characters ( ^@ ) at the end of the file and line feed symbols ( ^M ). I am developing using emacs and gcc on linux and of course VS .NET 2003 on the windows side.
I tried recode but i think i am using it wrong because nothing changes:
i saw a day a magical command under emacs which suppressed all ^M in a buffer, but i do not remember what it was. What i do is a M-x replace-string ^M by nothing... but well if you find a better method i'll be interested.
Tchou kanaky ! tchou !
Dunno if this comes standard on all *nix distros, but have you tried dos2unix?
jfl.
jfl.
i heard that dos2unix was replaced with recode so i didn't actually look further but i think i should now :)
dos2unix is available and i have Suse 9.1:
... removed the line feeds ( ^M ). This command also removes all rights except read and write rights for the owner but it doesn't change the rights of folders which i find pretty handy because when copying from windows everyone has read, write and execute rights on all files.
...but the null characters ( ^@ ) are still there.
They luckily only mess up the compilation output but i find them most annoying for instance when searching for other warnings or errors.
dos2unix -o *
... removed the line feeds ( ^M ). This command also removes all rights except read and write rights for the owner but it doesn't change the rights of folders which i find pretty handy because when copying from windows everyone has read, write and execute rights on all files.
...but the null characters ( ^@ ) are still there.
They luckily only mess up the compilation output but i find them most annoying for instance when searching for other warnings or errors.
math/OVmath.hh:39:1: warning: null character(s) ignoredmath/OVmath.hh:39:1: warning: no newline at end of filemath/OVmath.cc:28:1: warning: null character(s) ignoredmath/OVmath.cc:28:1: warning: no newline at end of file
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement