Wednesday·24·November·2010
Useful but Unknown Unix Tools: convmv //at 01:05 //by abe
Ogg and MP3 files often contain the interpreter and song title in the file name. Which is (besides quoting blanks, etc.) usually no issue if you have English interpreters or song titles.
But it may become a character set issue, if you have songs with e.g. French, German, Greek, or Russian interpreters or song titles: They may not be in your preferred character set and therefore don’t display properly on your system. Worst case: You just see questions marks.
If you face such problems, convmv (man page, Debian package) is your tool, because convmv converts filenames from one encoding to another:
$ ls -lF total 4 -rw-rw-r-- 1 abe abe 4 2010-11-21 16:17 ???? $ convmv -f latin1 -t utf-8 * Your Perl version has fleas #37757 #49830 Starting a dry run without changes... mv "./??" "./äöüß" No changes to your files done. Use --notest to finally rename the files. $ convmv --notest -f latin1 -t utf-8 * Your Perl version has fleas #37757 #49830 mv "./??" "./äöüß" Ready! $ ls -lF total 4 -rw-rw-r-- 1 abe abe 4 2010-11-21 16:17 äöüß $
Of course it can also recursively rename your whole Ogg collection. And it can do it interactively, too:
$ ls -lF total 4 -rw-rw-r-- 1 abe abe 4 2010-11-21 16:17 ???? $ convmv -i --notest -f latin1 -t utf-8 * Your Perl version has fleas #37757 #49830 mv "./??" "./äöüß" (y/n) y Ready! $ ls -lF total 4 -rw-rw-r-- 1 abe abe 4 2010-11-21 16:17 äöüß $
So convmv takes away at least one UTF-8 migration fear.
Update 23:03: Nearly forgot, but Mowgli reminded me:
There is also convmvfs (Debian package), a FUSE
based filesystem which converts file names on access.
Tagged as: Accent, Character Set, charset, CLI, Conversion, convmv, FUSE, ISO-Latin, Ligature, Migration, Mowgli, nuggets, Renaming, Umlaut, UTF-8, UUUT
// show without comments // write a comment