Some years ago, a stupid error happend to me: As I found in some tutorials, I mounted a Windows share from my Windows 2000 Server on my Ubuntu machine with "mount -t cifs" and so on, and moved a lot of pictures files from the Windows server to my Ubuntu server. Some weeks later I discovered that a lot of filenames got srambled. In detail, it was some umlauts and the "ß" (we use these letters in German) and some "é" and "è" from french descriptions that were replaced by some strange characters. Today, I searched the web for a solution and found it: convmv! Just do a "apt-get install convmv" to get that small program and call it like this:
convmv -r -f cp850 -t utf-8 *
If would show you for every file in your folder and its subfolders, if there would be something to do. If you are happy with the results, you put a "--notest" at the end, so it reads like this:
convmv -r -f cp850 -t utf-8 * --notest
And your file names are fixed. :-)
Hint: It's quite more intelligent to leave file names as they are (for example, my digital camera gives them names like DSCN0305.JPG) and save remarks and descriptions in the EXIF metadata or the like. In previous times (before 2009) I used to rename photos and I found out that's it's a bad idea, not only because of encoding problems when transferring or archiving those files, but also because it's the default setting of almost every file system browser like Windows Explorer, Nautilus, Thunar and so on to sort files alphabetically. If you leave the default names from your camera, your sorting is always in the same order as you have taken the pictures (sorting by EXIF data is possible too for example in Windows Explorer, but this forces the file system browser to look up the EXIF data in every file which takes much longer than sorting by file name on current systems).
Keine Kommentare:
Kommentar veröffentlichen