Okay, I figured out what was going wrong. I thought setTitle and the
like would set an Id3v2 frame's encoding using the TagLib::String's
encoding, and wasn't setting it, so it was still being stored and read
as Latin1.<br>
<br>
Thanks for your help. Again, this is an outstanding library.<br><br>
-Brian<br>
<br><div><span class="gmail_quote">On 5/31/05, <b class="gmail_sendername">Scott Wheeler</b> <<a href="mailto:wheeler@kde.org">wheeler@kde.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tuesday 31 May 2005 23:11, Brian Nickel wrote:<br>> Hi,<br>><br>> I'm writting a tagging plugin for the Muine Music Player (Gnome/C#)<br>> using TagLib. Everything is going well, and the library is beautiful
<br>> to use, but I'm trying to get UTF8 strings to save as UTF8.<br>><br>> One simple example:<br>><br>> char * val = "δΑ, ΧΩ ΝΟΦΕΤΕ.";<br>> myTag->setTitle (TagLib::String(val, TagLib::String::UTF8));
<br>> // myTag->title ().toCString (true) == "0, 2K <>65B5."<br>><br>> Am I just doing something wrong, or is there another way to go about<br>> this, or is it a bug?<br><br>It's probably just an issue somewhere between unicode literals (
i.e. did you<br>save the file as UTF-8 encoded?) the console's locale and whatnot. It should<br>work fine in real code -- that's the same method we use to convert things to<br>and from QString and it works quite well:<br>
<br>#define QStringToTString(s) TagLib::String(s.utf8().data(),<br>TagLib::String::UTF8)<br><br>(s.utf8().data() just returns a "const char *" of utf8 data)<br><br>Cheers,<br><br>-Scott<br><br>--<br>The three chief virtues of a programmer are: laziness, impatience and hubris.
<br>--Larry Wall<br>_______________________________________________<br>taglib-devel mailing list<br><a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/taglib-devel">
https://mail.kde.org/mailman/listinfo/taglib-devel</a><br></blockquote></div><br>