kfile_mp3 patch to support id3v2 tags

MadCoder pierre.habouzit at m4x.org
Sun Oct 27 01:33:53 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> > kfile_mp3.cpp:180: no matching function for call to `ID3_Tag::Link
> > (QString, ID3_TagType)'
> > /usr/include/id3/tag.h:74: candidates are: size_t ID3_Tag::Link(const
> > char *, short unsigned int = 65535)

what did you do ? line 180 is :
,---------------------------------------------------
id3v2->Link(mp3.filename, (short unsigned int)ID3TT_ID3V2);
`---------------------------------------------------
and mp3.filename is a char[] ...
it's not my fault !

I used the KDE build system !!

> There's also a more serious problem to this: what encoding is used by
> libid3? Is it UNICODE-clean? You'll have to use latin1() if it only works
> with latin1 anyway, local8Bit() if it works only with 8bit strings but
> supports local charsets or utf8() if it supports UTF-8. Similarly for
> converting back from libid3's char* values to a QString. Otherwise your
> plugin will fail for non-latin1 users.

in fact, the id3lib does not care of encoding. you give her the string it 
copy it to the tag place, and it read the tag and give you the raw data, 
you do what you want with it.

the standard tells that a id3v2 tag should be iso-8859-1 encoded or unicode 
encoded (http://www.id3.org/id3v2.3.0.html#sec3.3). But as one developper 
of the actual kfile_mp3 plugin said on the cvs comments : many player 
does'nt support utf8.

So i made the same choice as him, i used 
QString::fromLocal8Bit/QString::local8Bit as the previous developper did.

if there is something wrong, say it to me, the modification is easy to do.
- -- 
MadCoder (51 57)

Linux, c'est comme la France, ce serait le + beau pays du monde s'il
n'était pas peuplé par des arrogants, suffisants pensants détenir
tout le savoir du monde...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9uzR8xB6ZXMmMkL4RAiRrAJkByK1T1d4Z+RxU8kmn7ldLNE3N9wCgpyzd
wgSitZIvtuvXWm8G6bwT22s=
=HPxW
-----END PGP SIGNATURE-----



More information about the kde-multimedia mailing list