msgconv

converts PO files between character encodings

TLDR

Convert PO file encoding
$ msgconv -t [UTF-8] [input.po] -o [output.po]
Convert to specific encoding
$ msgconv --to-code=[ISO-8859-1] [file.po]
Convert and output to stdout
$ msgconv -t [UTF-8] [input.po]
Force conversion
$ msgconv --force [input.po] -o [output.po]

SYNOPSIS

msgconv [options] [inputfile]

DESCRIPTION

msgconv converts PO files between character encodings. It's part of GNU gettext.The tool handles translation file encoding. Preserves message structure during conversion.

PARAMETERS

INPUTFILE

PO file to convert.
-t ENCODING
Target encoding.
--to-code ENCODING
Target character encoding.
-o FILE
Output file.
--force
Force conversion.
--help
Display help information.

INSTALL

sudo apt install gettext
sudo dnf install gettext
sudo pacman -S gettext
sudo apk add gettext
brew install gettext
nix profile install nixpkgs#gettext

CAVEATS

Part of gettext-tools. May lose data in incompatible conversions. UTF-8 recommended.

HISTORY

msgconv is part of GNU gettext, providing internationalization tools since 1995.

SEE ALSO

msgen(1), msgfmt(1), msgmerge(1)