LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   [Enter] in text documents diffrent on Windows and Linux? UTF-8/UTF-16 problem or? (http://www.linuxquestions.org/questions/linux-general-1/%5Benter%5D-in-text-documents-diffrent-on-windows-and-linux-utf-8-utf-16-problem-or-258704/)

brynjarh 11-24-2004 05:23 AM

[Enter] in text documents diffrent on Windows and Linux? UTF-8/UTF-16 problem or?
 
I have noticed that the few times I have had to work on computers with one of the Windows operating systems my text files have two boxes instead of [Enter], you can see an example of them in this [ http://binni.gothicmars.com/simplicity.css ] file if you are on a Windows machine.

I don't know much about how text works, how it is encoded, but is this a problem with the fact that Linux uses UTF-8 to encode text files while Windows uses UTF-16?

b0uncer 11-24-2004 06:20 AM

yup, linux and windows use different kinds of line terminators. when you create a text file in linux, or in windows, you'll have to "encode" it so you can use it smoothly on the other. for linux there is a tool called "dos2unix" which handles the "translation" in both ways (so it's actually both dos2unix and unix2dos).

at least in ArchLinux the package containing dos2unix is called "hd2u". so try to find it or "dos2unix"


All times are GMT -5. The time now is 11:14 PM.