enca

Detect and convert the encoding of text files. More information: <https://github.com/nijel/enca>.

Install

All systems
curl cmd.cat/enca.sh
Debian Debian
apt-get install enca
Ubuntu
apt-get install enca
Alpine
apk add enca
Arch Arch Linux
pacman -S enca
image/svg+xml Kali Linux
apt-get install enca
Fedora
dnf install enca
Windows (WSL2)
sudo apt-get update sudo apt-get install enca
OS X
brew install enca
Raspbian
apt-get install enca
Docker
docker run cmd.cat/enca enca powered by Commando

Detect and convert the encoding of text files. More information: <https://github.com/nijel/enca>.

  • Detect file(s) encoding according to the system's locale:
    enca path/to/file1 path/to/file2 ...
  • Detect file(s) encoding specifying a language in the POSIX/C locale format (e.g. zh_CN, en_US):
    enca -L language path/to/file1 path/to/file2 ...
  • Convert file(s) to a specific encoding:
    enca -L language -x to_encoding path/to/file1 path/to/file2 ...
  • Create a copy of an existing file using a different encoding:
    enca -L language -x to_encoding < original_file > new_file

© tl;dr; authors and contributors