Tools Menu
FAR offers a small collection of useful utilities. These tools operate on the set
of selected files, just like the replace and rename operation. Thus, to protect a file
in the result list from changes, it is sufficient to deselect its checkbox. The utilities are:
- Assign Encoding: Assigns a particular encoding to all selected (checked) files. This
operation does not alter the files on disk. It has the same effect as changing the (declared)
encoding in the info view or editor. But it allows to define the encoding for an entire collection of
files at once.
- Validate Encoding: Verifies if the selected files can be read with no error using their
respective, assigned encoding. This does not guarantee the encoding is right! It just checks there
are no manifest errors when reading the file. For example, a UTF-8 encoded file can allways be read using
ISO-8859-family encoding, even though this will likely produce some "funny" characters. An ISO-8859-1 encoded
file on the other hand will produce an decoding error when read with UTF-8 (unless of corse it actually contains
only ASCII characters, in which case it could correctly be read with either encoding).
Bottom line: If validation fails, no replace operation will work using the currently assigned encoding.
- Change Encoding: Transforms the selected files into the selected character encoding, using their
respective assigned encoding for reading. Use this operation to change a file say, from ISO-8859-1 to UTF-8.
This will alter the file on disk.
- Line Breaks: Changes the line breaks, e.g. from Windows CR+LF to Unix line feed (LF)
- Remove Empty Lines: Removes empty lines.
- Trim Lines: Removes white space (blank and tab character), from the beginning and
the end of every line.
Err, that's all right, but how to change file encoding now?
Make sure the respective file has the right encoding assigned (its current encoding). Then use "Change Encoding", selecting
the desired new encoding, to transform the file on disk.