While plain-text is probably the simplest and most interchangeable
file format in the computer world, there is still variation
in what plain-text means from system to system. Plain-text
files can differ in character set, line termination, and
wrapping.
While character set differences are
the most obvious and pose the most challenge to portability,
they affect nedit only indirectly via the same font
and localization mechanisms common to all X applications.
If your system is set up properly, you will probably
never see character-set related problems in nedit.
NEdit can not display Unicode text files, or any multi-byte
character set.
The primary difference between an MS
DOS format file and a Unix format file, is how the
lines are terminated. Unix uses a single newline character.
MS DOS uses a carriage-return and a newline. NEdit
can read and write both file formats, but internally,
it uses the single character Unix standard. NEdit
auto-detects MS DOS format files based on the line
termination at the start of the file. Files are judged
to be DOS format if all of the first five line terminators,
within a maximum range, are DOS-style. To change the
format in which nedit writes a file from DOS to Unix
or visa versa, use the ... command and check or un-check the MS
DOS Format button.
Wrapping within text files can vary
among individual users, as well as from system to
system. Both Windows and MacOS make frequent use of
plain text files with no implicit right margin. In
these files, wrapping is determined by the tool which
displays them. Files of this style also exist on Unix
systems, despite the fact that they are not supported
by all Unix utilities. To display this kind of file
properly in NEdit, you have to select the wrap style
called Continuous. Wrapping modes are discussed in
the sections: Customizing
/Preferences, and Basic
Operation/Shifting and Filling.
The last and most minute of format
differences is the terminating newline. NEdit, like
vi and approximately half of Unix editors, enforces
a final terminating newline on all of the files that
it writes. NEdit does this because some Unix compilers
and utilities require it, and fail in various ways
on files which do not have it. Emacs does not enforce
this rule. Users are divided on which is best.
|