Creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.
iconv -f fromEncoding -t toEncoding inputFile > outputFile
Byte sized tech know-how.
Creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.
iconv -f fromEncoding -t toEncoding inputFile > outputFile
Copyright © 2024 Txt
don’t set the input and the output file as the same or you’ll end up with an empty file like me. use a temporary file and then override the old one 😛
@aza : better: use `sponge` tool (it acts like a buffer) :
iconv -f fromEncoding -t toEncoding myfile | sponge myfile