Package: lltag Version: 0.14.2-1 Severity: normal The encoding of the data that is put into the ID3 tag depends on the system locale, even if the data was fetched from a freedb.org server. However, the charset in the ID3 tag is always set to "latin1".
Example: --------------------------------------------------------------------------- $ lltag --mp3v2 --cddb *.mp3 Processing file "01 - Ich find alles gut.mp3"... Enter CDDB query [<query>q] (no default, h for help) ? superpunk why not Sending CDDB request... 1: Superpunk / Why Not? (cat=newage, id=d90a7c0e) Enter CD index [<index>Vkq] (no default, h for help) ? 1 Sending CDDB request... ID: d90a7c0e DATE: 2008 ARTIST: Superpunk CAT: newage TRACKS: 14 GENRE: Punk ALBUM: Why Not? Track 01: Ich find alles gut Track 02: Ja, ich bereue alles Track 03: Baby, ich bin zu alt Track 04: Bon Scott Track 05: South Beach Track 06: Hamburg ist der Platz für dich Track 07: Parties in München Track 08: New York USA Track 09: Ich trinke Track 10: Carsten ist mein Name Track 11: Ich funktioniere nicht mehr Track 12: Auf Tape Track 13: Eine schärfere Welt Track 14: Oh, alter Punk Enter track index [<index>aEVckq] (default is Track 1, h for help) ? a Current tag values are: ARTIST: Superpunk TITLE: Ich find alles gut ALBUM: Why Not? NUMBER: 1 GENRE: Punk DATE: 2008 ID: d90a7c0e CAT: newage Use these tag values [yaPCEDZROnqQ] (default is yes, h for help) ? a Cannot set ID in MP3 ID3v2 tags Cannot set CAT in MP3 ID3v2 tags Processing file "02 - Ja, ich bereue alles.mp3"... Going back to previous CD cat=newage id=d90a7c0e NOTICE: Automatically choosing next CDDB track, #2... Cannot set ID in MP3 ID3v2 tags Cannot set CAT in MP3 ID3v2 tags [snip] Processing file "07 - Parties in München.mp3"... Going back to previous CD cat=newage id=d90a7c0e NOTICE: Automatically choosing next CDDB track, #7... Cannot set ID in MP3 ID3v2 tags Cannot set CAT in MP3 ID3v2 tags ------------------------------------------------------------------- Now, lets see what is written into the ID3 tags, with a reliable tool (eyeD3): ------------------------------------------------------------------------------ $ eyeD3 --debug 07\ -\ Parties\ in\ München.mp3 [snip] eyeD3 trace> +++++++++++++++++++++++++++++++++++++++++++++++++ eyeD3 trace> FrameSet: Reading Frame #3 eyeD3 trace> FrameHeader [start byte]: 44 (0x2C) eyeD3 trace> FrameHeader [id]: TIT2 (0x54495432) eyeD3 trace> FrameHeader [data size]: 20 (0x14) eyeD3 trace> FrameHeader [flags]: ta(0) fa(0) ro(0) co(0) en(0) gr(0) un(0) dl(0) eyeD3 trace> FrameSet: Reading 20 (0x14) bytes of data from byte pos 54 (0x36) eyeD3 trace> FrameSet: 20 bytes of data read eyeD3 trace> TextFrame encoding: latin_1 eyeD3 trace> TextFrame text: Parties in München eyeD3 trace> sizeLeft: 338 ----------------------------------------------------------------------------- As you can see, UTF8 data was written into the tag, but the encoding was specified as latin1, resulting in corrupted data (München vs. München). My system locale is set to UTF8: $ locale | grep LC_CTYPE LC_CTYPE=de_DE.UTF-8 The UTF8 text in the ID3 tag is doubly wrong here, because an ID3 V2.3 tag is written, and v2.3 doesn't even support UTF8 encoding, only UTF16, but this is a libmp3-tag-perl bug. Now, I'll do this again with the locale charset set to latin1: ----------------------------------------------------------------------------- $ LC_CTYPE=de_DE lltag --mp3v2 --cddb *.mp3 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "de_DE", LANG = "C" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Processing file "01 - Ich find alles gut.mp3"... Enter CDDB query [<query>q] (no default, h for help) ? superpunk why not Sending CDDB request... 1: Superpunk / Why Not? (cat=newage, id=d90a7c0e) Enter CD index [<index>Vkq] (no default, h for help) ? 1 Sending CDDB request... ID: d90a7c0e DATE: 2008 ARTIST: Superpunk CAT: newage TRACKS: 14 GENRE: Punk ALBUM: Why Not? Track 01: Ich find alles gut Track 02: Ja, ich bereue alles Track 03: Baby, ich bin zu alt Track 04: Bon Scott Track 05: South Beach Track 06: Hamburg ist der Platz f�r dich Track 07: Parties in M�nchen Track 08: New York USA Track 09: Ich trinke Track 10: Carsten ist mein Name Track 11: Ich funktioniere nicht mehr Track 12: Auf Tape Track 13: Eine sch�rfere Welt Track 14: Oh, alter Punk Enter track index [<index>aEVckq] (default is Track 1, h for help) ? a Current tag values are: ARTIST: Superpunk TITLE: Ich find alles gut ALBUM: Why Not? NUMBER: 1 GENRE: Punk DATE: 2008 ID: d90a7c0e CAT: newage Use these tag values [yaPCEDZROnqQ] (default is yes, h for help) ? a Cannot set ID in MP3 ID3v2 tags Cannot set CAT in MP3 ID3v2 tags Processing file "02 - Ja, ich bereue alles.mp3"... Going back to previous CD cat=newage id=d90a7c0e NOTICE: Automatically choosing next CDDB track, #2... Cannot set ID in MP3 ID3v2 tags Cannot set CAT in MP3 ID3v2 tags [snip] Processing file "07 - Parties in München.mp3"... Going back to previous CD cat=newage id=d90a7c0e NOTICE: Automatically choosing next CDDB track, #7... Cannot set ID in MP3 ID3v2 tags Cannot set CAT in MP3 ID3v2 tags ---------------------------------------------------------------------------- This is what eyeD3 says: ---------------------------------------------------------------------------- $ eyeD3 --debug 07\ -\ Parties\ in\ München.mp3 [snip] eyeD3 trace> +++++++++++++++++++++++++++++++++++++++++++++++++ eyeD3 trace> FrameSet: Reading Frame #3 eyeD3 trace> FrameHeader [start byte]: 44 (0x2C) eyeD3 trace> FrameHeader [id]: TIT2 (0x54495432) eyeD3 trace> FrameHeader [data size]: 19 (0x13) eyeD3 trace> FrameHeader [flags]: ta(0) fa(0) ro(0) co(0) en(0) gr(0) un(0) dl(0) eyeD3 trace> FrameSet: Reading 19 (0x13) bytes of data from byte pos 54 (0x36) eyeD3 trace> FrameSet: 19 bytes of data read eyeD3 trace> TextFrame encoding: latin_1 eyeD3 trace> TextFrame text: Parties in München eyeD3 trace> sizeLeft: 339 eyeD3 trace> +++++++++++++++++++++++++++++++++++++++++++++++++ ---------------------------------------------------------------------------- Now the tag data is correctly encoded. So lltag garbles the data fetched from a cddb server depending on the system locale, which is very strage behaviour I think. Regards, Tino -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-rc4-00187-gb4348f3 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lltag depends on: ii perl 5.10.0-22 Larry Wall's Practical Extraction Versions of packages lltag recommends: pn flac <none> (no description available) ii libmp3-tag-perl 1.00-1 Module for reading tags of MP3 aud ii libterm-readline-gnu-perl 1.19-1 Perl extension for the GNU Readlin ii libterm-readline-perl-perl 1.0302-1 Perl implementation of Readline li ii libwww-perl 5.826-1 WWW client/server library for Perl pn mp3info <none> (no description available) ii vorbis-tools 1.2.0-6 several Ogg Vorbis tools lltag suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org