I totally agree with you, this whole encoding thing is a real pain. I am in the process of writing an application that will, amongst other things, rename an mp3 file according to its id3 tag. This is how I got into the horribly confusing world of python encoding, as so far all the mp3’s I’ve come across are in latin-1, and turning that into something I can manipulate has been problematic. The fact that I’m going cross platform with this doesn’t help. I also want to add support for other encodings (utf-16,utf8, etc…). Like you said, how am I supposed to know what encoding was used in the mp3? I’m thinking about a series of try: except:, or maybe a loop that tries each encoding ?!? It’ll get done eventually, but for now latin1 will have to do – at least I can rename my Brassens titles without crashing my app.
Anyway I would like to say that this page was informative by giving me a list of things to try out all in one conveniant package, rather than searching through cryptic python doc pages. Merci l’ami !
– ianaré
jbalaguesays:
I agree with you as well.
I’m going mad reading and writing XML Unicoded files!!!
— jbalague
kent sinsays:
Sometimes, for example, when reading RSS feeds, even the programmer do not known what is the encoding.
I agree with you that unicode is very bad support in python, but that is the best scripting language support we can find.
I totally agree with you, this whole encoding thing is a real pain. I am in the process of writing an application that will, amongst other things, rename an mp3 file according to its id3 tag. This is how I got into the horribly confusing world of python encoding, as so far all the mp3’s I’ve come across are in latin-1, and turning that into something I can manipulate has been problematic. The fact that I’m going cross platform with this doesn’t help. I also want to add support for other encodings (utf-16,utf8, etc…). Like you said, how am I supposed to know what encoding was used in the mp3? I’m thinking about a series of try: except:, or maybe a loop that tries each encoding ?!? It’ll get done eventually, but for now latin1 will have to do – at least I can rename my Brassens titles without crashing my app.
Anyway I would like to say that this page was informative by giving me a list of things to try out all in one conveniant package, rather than searching through cryptic python doc pages. Merci l’ami !
– ianaré
I agree with you as well.
I’m going mad reading and writing XML Unicoded files!!!
— jbalague
Sometimes, for example, when reading RSS feeds, even the programmer do not known what is the encoding.
I agree with you that unicode is very bad support in python, but that is the best scripting language support we can find.