Florin Lipan

Welcome to my personal website.

Salut! I'm a Ruby/Rust/Crystal developer with a devops background and leadership experience. You can also find me here: GitHub / Twitter / LinkedIn / Email.

↞ Back

Linux: How to change the file encoding from the command line

Let’s say you have a file encoded as ISO-8859-16 and would like to turn it into UTF-8.

You can use iconv to accomplish that:

iconv -f ISO_8859-16 -t UTF-8 -o output.txt input.txt

In case you’d like to convert to or from a different encoding, you can list all encodings known to iconv by calling:

iconv -l

If you enjoyed my blog post, please spread the news:

Share on Hacker News
Share on Reddit