I bought my kids a new CD player that also takes a USB drive with MP3 files.
The problem is that many of the file names are in Hebrew and the
MP3 player can’t read Hebrew file names, it just shows up as
XXXXXXXXXXXXXX.mp3 and that’s not very helpful.
I found a nice module for python that transliterates Unicode to ASCII, I believe using Iconv,Unidecode.
The installation was straight forward. The tests failed, but the module seemed to work anyway.
1 2 3 4 5 6 7
One catch was how to get the file names in Unicode. Using the path
listdir as Unicode, gets the file names in Unicode.
Works decent, but not 100%. I’m not sure who set up the transliteration rules but we get some funny results, for Hebrew at least.
1 2 3 4 5 6 7 8 9 10 11 12
Still more informative than