An abstraction for the string to data encoding in Info tags. More...
#include <infotag.h>
Public Member Functions | |
StringHandler () | |
virtual | ~StringHandler () |
StringHandler (const StringHandler &)=delete | |
StringHandler & | operator= (const StringHandler &)=delete |
virtual String | parse (const ByteVector &data) const |
virtual ByteVector | render (const String &s) const |
An abstraction for the string to data encoding in Info tags.
RIFF INFO tag has no clear definitions about character encodings. In practice, local encoding of each system is largely used and UTF-8 is popular too.
Here is an option to read and write tags in your preferred encoding by subclassing this class, reimplementing parse() and render() and setting your reimplementation as the default with Info::Tag::setStringHandler().
TagLib::RIFF::Info::StringHandler::StringHandler | ( | ) |
|
virtual |
|
delete |
|
delete |
|
virtual |
Decode a string from data. The default implementation assumes that data is an UTF-8 character array.
|
virtual |
Encode a ByteVector with the data from s. The default implementation assumes that s is an UTF-8 string.