Amarok patch for local encoded ID3 tags

Chih-Wei Huang cwhuang at linux.org.tw
Tue Apr 8 17:00:47 CEST 2008


Hi Jeff,
This is my first time to get your reply. Thank you anyway!

The problem that my patch tried to fix is, many mp3 files
don't encoded id3 tags in UTF-8, but in their local encoding,
e.g., Big5 for traditional Chinese.

My patch tries to detect whether if the tags are valid UTF-8 strings.
If not, assume they are encoded in the local encoding according to
the locale setting. For example, suppose the locale is zh_TW.UTF-8,
then assume the tags are encoded in Big5, the local encoding of zh_TW,
if they are not valid UTF-8 strings.
This is just a fallback workaround.
However, it works for most situations.

Though I fixed the problem primarily for Eee PC,
I did see the problem also appear in other distributions
I've tried like Debian/Fedora, which ship with even newer amarok.
Actually the patch applied to 1.4.3 as well as to 1.4.8.

I don't know whether if the newest Taglib has fix the issue.
I guess not.

If you need, I can send you such a file when I'm back home.
(I'm participating Linux Foundation Collaboration Summit now)


Chih-Wei

Jeff Mitchell:
> Trying one more time...Chin-Wei, did you receive this?
> 
> Jeff Mitchell wrote:
>> Chih-Wei--
>>
>> After looking at this patch and our code, I'm having a little trouble 
>> understanding why you're running into this problem in the first 
>> place...the strings we get from TagLib should be UTF-8 already.
>>
>> Is it possible for you to send a sample file to me that exhibits this 
>> behavior?  I'd like to test it with more recent versions of Amarok and 
>> TagLib (I can see that you are using 1.4.3 on the Eee and I'm guessing 
>> some snapshot or stock TagLib 1.4...lots of bugs have been fixed in 
>> both applications since then).  Even if it doesn't work here it may 
>> turn out that the proper place for a fix is in TagLib.



More information about the Amarok-devel mailing list