void String::copyFromUTF16(...) - Comments
tsuda.kageyu at gmail.com
Wed Jan 22 19:56:28 UTC 2014
>If you read a little-endian BOM as a 16-bit integer in a little-endian
>system, it will be 0xfeff.
>That's what this line checks.
>> if(length >= 1 && s == 0xfeff)
If s == 0xfeff, it means you are reading a UTF-16LE string on a
little-endian system or a UTF-16BE one on a big-endian system. The
comment "Same as CPU endian. No need to swap bytes." describes that
If the UTF-16 endian is different from the CPU endian, a BOM will look
like swapped and s will be 0xfffe.
More information about the taglib-devel