Filename Encoding Hell

2006-04-12 12:54:39 GMT

Anyone whose native language is other than English and uses Linux has probably experienced some kind of filename encoding issues. This problem can happen, because there is no standard filename encoding on Linux so depending on the active locales that the applications use, they can encode filenames with any encoding.

This can be a serious pain, because many applications fail to decode these badly encoded filenames and cannot open these files at all. You can rename the corrupted filenames one by one, of course, but this can be a very tiresome experience.

To make things better, here is a script named fix-filenames.py. It is originally written by Federico Mena Quintero, a hardcore GNOME hacker who I respect very much. His script had some problems so I have (hopefully) fixed most them. It is by no means perfect, but it's pretty usable.