Converting filname encoding

I recently found my self in a desperate need of converting the filename encoding for a lot of files. I searched the net and found the tool convmv.

Installing convmv in Ubuntu (5.10)

To install convmv in Ubuntu just type the following:

sudo apt-get install convmv

There is one problem though, the version that gets installed is 1.08 and when using that version together with Perl v5.8.7 it can be a problem when converting filenames to UTF-8.

To get around this problem you can either install convmv 1.09 (by hand) or you can use the --nosmart flag when converting to UTF-8. (I used the later with success.)

Converting filenames

My problem was that the filenames was encoded in Latin1 (iso-8859-1) and I needed them to be UTF-8. To do this I used the following options:

convmv --nosmart -f iso-8859-1 -t utf8 -r MyFileFolder

That command doesn't rename anything, it just prints out what it wants to do. To perform the actual conversion you have to run the command again with the additional option --notest.

convmv --notest --nosmart -f iso-8859-1 -t utf8 -r MyFileFolder

Now, in the best of worlds, all files should have the correct filename encoding.

Related links


Comment this note:

Your name:
Your email (hidden):
Message:
Enter the validation code :
Private! (visible for webmaster only)

No messages yet.