store text using UTF-8

moowei emailmoo at gmail.com
Thu Jun 15 21:09:11 CEST 2006


Hi all,

I came up with another question (under id3v2 scheme, as far as I concern):

TagLib uses UTF16BE as its internal text encoding. It converts
everything into UTF16-BE when parsing files. Not only that, it seems
that when storing tags back to the file ,taglib also stores all text
by UTF16BE by default, regardless of the encoding specified in each
frame header. Am I wrong?

If above is true, does it mean that if I want to store some text in
UTF8, I would have to explicitly call "std::string String::to8Bit(bool
unicode) const" ? but... I still have to put the returned std::string
back to a TagLig::String container in order to use other APIs (e.g.
TagLib::ID3v2::TextIdentificationFrame::setText (const String &s) )...
and it will again be converted into UTF16BE... so..... HOW do I store
text using UTF-8 encoding?

I seemed to be complicating the issue. Are there examples regarding
character encoding?

Thanks again.

Moo


More information about the taglib-devel mailing list