Hi allen,<br><br>Internally taglib stores tag in UTF16 encoding. While old taglib version will decode <br>as Latin1 in whatever case by mistake.<br>A work around is to specify UTF8 as default internal encoding, by something like this:
<br><code><br>TagLib::ID3v2::FrameFactory *f = Audio::TagLib::ID3v2::FrameFactory::instance();<br>f->setDefaultTextEncoding(TagLib::String::UTF8);<br>TagLib::MPEG::File *i = new TagLib::MPEG::File(path);<br>i->setID3v2FrameFactory(f);
<br></code><br><br>A similar bugzilla at <a href="http://rt.cpan.org/Public/Bug/Display.html?id=25401">http://rt.cpan.org/Public/Bug/Display.html?id=25401</a><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> 1. having trouble to encode muti-byte char (chinese big5) to<br> mp3's title using taglib (allen lau)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1
<br>Date: Sat, 31 Mar 2007 09:59:49 -0700 (PDT)<br>From: allen lau <<a href="mailto:sirpelidor@yahoo.com">sirpelidor@yahoo.com</a>><br>Subject: having trouble to encode muti-byte char (chinese big5) to<br> mp3's title using taglib
<br>To: <a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>Message-ID: <<a href="mailto:917875.36723.qm@web58707.mail.re1.yahoo.com">917875.36723.qm@web58707.mail.re1.yahoo.com</a>><br>Content-Type: text/plain; charset=iso-8859-1
<br><br>Hi,<br><br>I was reading the thread on February 2007 titled: "bug<br>encoding multibyte? Ray". But I didn't find my<br>answer, hope I can get my anaswer here :)<br><br>I was trying to write a chinese (big5) song title into
<br>a mp3 file using TagLib. Upon completed operation,<br>the song title shows as ????.mp3 in both window and<br>ITunes. I think I must missing a small step... would<br>anyone please help me take a look at what I did wrong?
<br><br>Thank you<br><br>[code]<br>string path = "C:/test.mp3";<br><br>try<br> {<br> TagLib.File file =<br>TagLib.File.Create(path);<br> file.Tag.Title = "&#40654;&#26126;";
<br>//big5 chinese char<br> file.Save();<br> }<br> catch (Exception e)<br> {<br> Console.Write(e.ToString());<br> return;<br> }<br>[/code]
<br><br><br></blockquote></div><br><br clear="all"><br>-- <br>cheers,<br>-dongxu<br>__END__<br><a href="http://search.cpan.org/~dongxu">http://search.cpan.org/~dongxu</a>