Re: Correct wrong character set?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2010-04-16 at 07:27 -0500, DaVince wrote:
> Are you editing UNIX files in a Windows program? In that case, it
> might be adding the "carriage return" character at the end of every
> line once you save it. Why? Well, here's why.
> 
> Text files in Windows and Linux have a very minor difference: the way
> they store "newlines". Linux uses the LF character (line feed).
> Windows uses TWO characters to indicate a line break: CR (carriage
> return) and LF (line feed).
> 
> Usually, when you try editing a text file that has only LF characters
> as newlines, Windows apps will behave differently depending on whether
> they support "seeing" this character:
> - Notepad doesn't recognize them as newlines at all and glues all 
>   text together;
> - Some editors recognize it correctly, then convert to CR+LF once
>   you save the file;
> - Some other editors recognize the file correctly and let you save
>   back to whatever format you were using (CR+LF, just LF, or just
>   CR in case of Macs).
> 
If, for some reason you want to use a Windows editor under wine to edit
both Windows and Linux files I can recommend PFE (the Programmers File
Editor, http://www.lancs.ac.uk/staff/steveb/cpaap/pfe/ ). Its a good,
well featured text file editor that can edit as many files
simultaneously as you'd ever need as well as acting as a primitive IDE,
but the reason I'm mentioning it is that it can edit both Windows and
Unix/Linux files and use the appropriate newline for each file.

If you don't mind using different editors but want them all to work just
the same then microEmacs (aka uemacs) is the answer. Its available for
many operating systems including Linux, DOS (where it runs in a console
window) and Windows, is readily customised and has the same look and
feel everywhere. http://www.aquest.com/emacs.htm It suits me so well
that I install it everywhere rather than learning a new editor. It is
written in C and has no relation to emacs apart from the name!
  

Martin





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux