View Single Post
Old 06/01/2018, 07:57 AM   #2
Join Date: May 2011
Location: Russia
Posts: 3,334
Reputation: 824
Default Re: Change characters in logs?

The charset doesn't support it probably, use
file -i file.log
to see the charset

iconv -l
To list all the available charsets

iconv -f ISO-8859-1 -t UTF-8//TRANSLIT input.file -o out.file
To set the charset.

whereas,-f CHARSET if "from charset" and -t CHARSET is "to charset"

`TRANSLIT` means that it will try to convert the file to another character, in case of a fail, it will replace it with a similar looking character that it can convert to.
Kaperstone is offline   Reply With Quote