Posts with the tag Text Encodings

Fix line endings in text files created on Microsoft (Dos) based platfoms to for Unix and Linux

Use dos2unix from the tofrodos package to convert files with Windows (DOS) style CRLF (carriage return and line feed) line endings to Unix style LF (linefeed only) line endings. Install as follows:

sudo aptitude install tofrodos

How you use the tool:

dos2unix dosfile.txt
...

Read on

Convert Text Between Different Encodings Using iconv

If you want to convert files from one encoding to another you want to use the tool iconv:

iconv -f WINDOWS-1252 -t UTF-8 about.txt  > about.utf.txt

The above command converts the about.txt input file from the old West-European encoding ISO-8859-1 to UTF-8 and saves the result to about.utf.txt.

The command...

Read on

Read and Convert NFO Files (Codepage 437)

http://de.wikipedia.org/wiki/Codepage_437

convert to UTF8 with iconv

to convert a file from Codepage 437 to UTF8 do:

iconv -f 437 -t UTF8 your_nfo_file.nfo | less

nfoview

http://home.gna.org/nfoview/

sudo aptitude install nfoview
...

Read on