2020-04-13

Convert UTF-8 NFD to UTF-8 NFC on Linux

convmv -f utf-8 -t utf-8 --nfc -r . --notest

This will for example convert the german ü from 75 cc 88 to 73 bc (which both describe an ü).

Doing this on a Samba server will avoid problems when accessing NFD filenames from a Mac.

2020-02-08

Convert Latin1 text to UTF8

One can use Python as a universal converter on the command line like this:
cat latin1.txt | python3 -c "import sys; t=sys.stdin.buffer.read(); sys.stdout.buffer.write(t.decode('iso-8859-1').encode('utf8'))" > utf8.txt