Today I needed to check the character encoding of a file, I found this page that explains how to do this. Basically the command file
will give you the info, for instance:
|
|
options -i
for --mime
and -b
for --brief
will give:
|
|
I figured out that I needed to convert my file from one character encoding to another and so I used iconv
. As mentioned in the link above,
iconv -l
will give you the list of character encodings iconv
handles. In my case, I needed to convert the file from Latin1, aka iso8859-1
to UTF-8, so I used the following command line:
|
|