Jason Tackaberry wrote: > Author: tack > Date: Wed Apr 26 15:39:05 2006 > New Revision: 1511 > > Modified: > trunk/metadata/src/audio/eyed3info.py > > Log: > Grip unicode bug workaround; dischi, please test this one of your mp3s that > you have encoded with grip but have corrected the encoding flag.
A small test works, but ...
> + for frame in id3.tag.frames:
> + if hasattr(frame, "text") and isinstance(frame.text,
> unicode):
> + try:
> + frame.text =
> frame.text.encode('latin-1').decode('utf-8')
> + except:
> + pass
... if you do the correct grip settings, you write latin-1 into the
tags. So a good latin-1 will be decoded as utf-8. That is not a good
idea. I don't think we should handle bad encoding settings of a stupid
app. In my case it worked because of the except stuff, but that is a
very bad solution.
Dischi
--
"Everything should be made as simple as possible, but not simpler."
(A.Einstein)
pgpzHfmAkx7An.pgp
Description: PGP signature
