mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Added some comment about UTF-16 encoding to String::data().
This commit is contained in:
parent
cfb43223dc
commit
c357d293a1
@ -457,8 +457,7 @@ ByteVector String::data(Type t) const
|
||||
ByteVector v(2 + size() * 2, 0);
|
||||
char *p = v.data();
|
||||
|
||||
// Assume that if we're doing UTF16 and not UTF16BE that we want little
|
||||
// endian encoding. (Byte Order Mark)
|
||||
// We use little-endian encoding here and need a BOM.
|
||||
|
||||
*p++ = '\xff';
|
||||
*p++ = '\xfe';
|
||||
|
@ -334,6 +334,9 @@ namespace TagLib {
|
||||
* UTF8, this will return a vector of 8 bit characters, otherwise it will use
|
||||
* 16 bit characters.
|
||||
*
|
||||
* \note If \a t is UTF16, the returned data is encoded in little-endian
|
||||
* format and has a BOM.
|
||||
*
|
||||
* \note The returned data is not null terminated.
|
||||
*/
|
||||
ByteVector data(Type t) const;
|
||||
|
Loading…
Reference in New Issue
Block a user