Asking for a Linux command line to
convert all files in current folder from UTF8 to ANSI, name unchanged.
Something similar to
for filename in *; do mv $filename `echo $filename | iconv -f UTF8 -t ANSI`; done
Warning: the above will fail badly if the filenames contain spaces. Tweak accordingly. Test with echo instead of mv first.
PS: I am not sure that ANSI is a correct encoding name (isn't it ISO-8859-1?). In any case, see
iconv --list output.
iconv seems not able to convert the file itself, which seems to tell, to keep the file name while converting is impossible....
It is always very good to have a backup in case something goes wrong, so
thisdir=$(pwd);cd ..; mv $thisdir $thisdir.back; mv something-or-other $thisdir; cd $thisdir
Beware that I did not test this code, so consider it pseudocode until proven otherwise.
The point is that now if your "ansi" encoded files aren't proper, the originals are still available in the .back directory, so you can easily undo the error, whatever it was.