what encoding does taglib use when using setTitle,setAlbum etc?
Lukáš Lalinský
lalinsky at gmail.com
Wed Sep 8 10:20:44 CEST 2010
On Wed, Sep 8, 2010 at 10:14 AM, berlinud <berlinudberlinud at gmail.com> wrote:
>
> hi Scott
> I'm sorry but I didn't find
> TagLib::ID3v2::FrameFactory::instance()-
> >setDefaultTextEncoding(TagLib::String::UTF8);
> there is no ID3v2 domain in TagLib,which source file is it in?
> What's more,I tried to write Chinese tags by
> TagLib::FileRef->tag()->setAlbum(QString::toUtf8.data());
>
> but it still write in latin1,it didn't convert tag to utf8 by default.
The default TagLib::String constructor for char* assumes Latin1, you
need to tell it you are passing UTF-8 data:
file->tag()->setAlbum(TagLib::String(QString::toUtf8.data(),
TagLib::String::UTF8));
Lukas
More information about the taglib-devel
mailing list