June 15, 2021

Encoding Tricks

Command-line conversion

So, someone (may they burn in hell forever) sent you a file encoded with Western (Windows 1252). Instead of going all This Is Sparta! on them, find solace in iconv:

iconv -f WINDOWS-1252 -t UTF-8 BADFILE > GOODFILE

Problem solved.