View previous topic :: View next topic |
Author |
Message |
jeffrey1790 n00b
Joined: 11 May 2011 Posts: 2
|
Posted: Wed May 11, 2011 3:32 am Post subject: Locale Setting Help |
|
|
When I open any file that was created in windows, i get ^M appended to every single line. My default locale is utf_8, ive also tried iso-8859-1, but still have the same problem.
My /etc/locale.gen
Code: |
en_US.UTF-8 UTF-8
en_US.ISO-8859-1 ISO-8859-1
|
I dont want to convert everyfile made in windows.
If anyone can help me fix this, that would be much appreciated. |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Wed May 11, 2011 8:12 am Post subject: |
|
|
Windows and Linux/UNIX systems (and older Macs for that matter) have different newline characters. See this wikipedia article about it.
The ^M is the extra carriage return that is part of the Windows newline character.
There's not much you can do to 'fix' the problem if you're e.g. sharing a drive between both OSes.
If you do want to convert between the two you should install app-text/dos2unix which will give you the dos2unix and unix2dos commands (as well as ones for converting between Mac and UNIX format). _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
jeffrey1790 n00b
Joined: 11 May 2011 Posts: 2
|
Posted: Wed May 11, 2011 3:14 pm Post subject: |
|
|
tomk wrote: | Windows and Linux/UNIX systems (and older Macs for that matter) have different newline characters. See this wikipedia article about it.
The ^M is the extra carriage return that is part of the Windows newline character.
There's not much you can do to 'fix' the problem if you're e.g. sharing a drive between both OSes.
If you do want to convert between the two you should install app-text/dos2unix which will give you the dos2unix and unix2dos commands (as well as ones for converting between Mac and UNIX format). |
After converting all the windows text files, I have noticed that an .ini file autogenerated by a linux game added the ^M to the end of each line. Since theres a ^M on each line, the game fails to read the preferences.
EDIT: Its just nano that seems to be the issue. |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Thu May 12, 2011 8:00 am Post subject: |
|
|
jeffrey1790 wrote: | EDIT: Its just nano that seems to be the issue. |
I don't use nano but it this option might be what you are looking for:
man nano wrote: | -N (--noconvert)
Disable automatic conversion of files from DOS/Mac format. |
Or the equivalent for nanorc:
man nanorc wrote: | set/unset noconvert
Don't convert files from DOS/Mac format. |
_________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
|