void String::copyFromUTF16(...) - Comments
Tsuda Kageyu
tsuda.kageyu at gmail.com
Tue Jan 21 16:04:58 UTC 2014
Hi Festus.
As you know, UTF-16 strings can be encoded in either little-endian or
big-endian form. Little-endian ones have a BOM like { 0xff, 0xfe } and
big-endian ones have { 0xfe, 0xff }.
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[0] == 0xfeff)
Kageyu.
More information about the taglib-devel
mailing list