I'd like to know of a batch method of renaming files on the filesystem to utf8 and replacing any non-converting characters to '_'.
You see, I'm using a python script to read information from my file system and I have many mp3s named with normal international characters (including Albanian, French, and Japanese) and some that show up with funky <?> characters instead. - the python script reads all files on the filesystem - it tries unicode(filename, 'utf-8').encode() - it barfs on (most?) proper international characters - it barfs on (some?) improper <?> characters - I catch the barf and allow non-unicode characters - sqlite3 allows utf8 and non-utf8 chars - most filenames can be inserted, including those barfed on - some filenames can't be inserted, (including those not barfed on ?) - sqlite barfs when extracting some filenames which it didn't barf on on insert I'm rather confused as what to do programmatically so I thought changing the filenames on the fs might work. AJ ONeal
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
