TagLib::RIFF::Info::StringHandler Class Reference

A abstraction for the string to data encoding in Info tags. More...

#include <infotag.h>

Public Member Functions

 StringHandler ()
 ~StringHandler ()
virtual String parse (const ByteVector &data) const
virtual ByteVector render (const String &s) const

Detailed Description

A 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().

See also

Constructor & Destructor Documentation

TagLib::RIFF::Info::StringHandler::StringHandler ( )
TagLib::RIFF::Info::StringHandler::~StringHandler ( )

Member Function Documentation

virtual String TagLib::RIFF::Info::StringHandler::parse ( const ByteVector data) const

Decode a string from data. The default implementation assumes that data is an UTF-8 character array.

virtual ByteVector TagLib::RIFF::Info::StringHandler::render ( const String s) const

Encode a ByteVector with the data from s. The default implementation assumes that s is an UTF-8 string.

The documentation for this class was generated from the following file: