Skip Menu |

This queue is for tickets about the MP3-Info CPAN distribution.

Report information
The Basics
Id: 2179
Status: open
Priority: 0/
Queue: MP3-Info

People
Owner: cnandor [...] cpan.org
Requestors: tim [...] tim-landscheidt.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.02
Fixed in: (no value)



Subject: utf8 and set_mp3tag()
Argh, I should have seen this earlier. If you call set_mp3tag() with utf8-strings, they get written out literally to the file and not latin1-encoded.
[guest - Tue Mar 4 20:40:34 2003]: Show quoted text
> Argh, I should have seen this earlier. If you call set_mp3tag() with > utf8-strings, they get written out literally to the file and not > latin1-encoded.
I guess that's probably bad ... but I am not entirely sure. I am tired and my brain is not working ... is converting it to Latin-1 definitely the Right Thing?
Show quoted text
> I guess that's probably bad ... but I am not entirely sure. I am > tired > and my brain is not working ... is converting it to Latin-1
definitely Show quoted text
> the Right Thing?
Well, if you assume in get_mp3tag() that incoming ID3v1 tags are in Latin-1, it might be wise to ensure that outgoing ID3v1 tags are in Latin-1 as well :-). The Right Thing (TM) is probably using ID3v2 (and Unicode). Hmmm. How about abandoning use_mp3_utf8() and introducing a new function that selects the default ID3v1 encoding (input/output; default: Latin-1). Maybe with some additional OOP sugar: MP3::Info->new(FILE, ENCODING) reads FILE's tag encoded in ENCODING, $tag->setencoding(ENCODING) sets the encoding for subsequent tag writes. How popular are not-Latin-1-encoded ID3v1 tags?
From: Tim Landscheidt <tim [...] tim-landscheidt.de>
Show quoted text
> I guess that's probably bad ... but I am not entirely sure. I am > tired > and my brain is not working ... is converting it to Latin-1
definitely Show quoted text
> the Right Thing?
Well, if you assume in get_mp3tag() that incoming ID3v1 tags are in Latin-1, it might be wise to ensure that outgoing ID3v1 tags are in Latin-1 as well :-). The Right Thing (TM) is probably using ID3v2 (and Unicode). Hmmm. How about abandoning use_mp3_utf8() and introducing a new function that selects the default ID3v1 encoding (input/output; default: Latin-1). Maybe with some additional OOP sugar: MP3::Info->new(FILE, ENCODING) reads FILE's tag encoded in ENCODING, $tag->setencoding(ENCODING) sets the encoding for subsequent tag writes. How popular are not-Latin-1-encoded ID3v1 tags?
From: Tim Landscheidt <tim [...] tim-landscheidt.de>
Show quoted text
> [...] > Hmmm. How about abandoning use_mp3_utf8() and introducing a new > function that selects the default ID3v1 encoding (input/output; > default: Latin-1). Maybe with some additional OOP sugar: > MP3::Info->new(FILE, ENCODING) reads FILE's tag encoded in ENCODING, > $tag->setencoding(ENCODING) sets the encoding for subsequent tag > writes. > [...]
Had some thoughts about defaults (to stay compatible with earlier releases): Default encoding to "utf-8" (or "ascii"?). Make use_mp3_utf8(TRUE) a shortcut for set_id3v1_encoding("iso-8859-1"). I will supply a patch in the next days.