{
unsignedint bwidth;
debug1("encoding: %u", encoding);
/* A note: ID3v2.3 uses UCS-2 non-variable 16bit encoding, v2.4 uses UTF16. UTF-16 uses a reserved/private range in UCS-2 to add the magic, so we just always treat it as UTF. */if(encoding > mpg123_id3_enc_max)
{
if(noquiet) error1("Unknown text encoding %u, I take no chances, sorry!", encoding);
mpg123_free_string(sb);
return;
}
bwidth = encoding_widths[encoding];
/* Hack! I've seen a stray zero byte before BOM. Is that supposed to happen? */if(encoding != mpg123_id3_utf16be) /* UTF16be _can_ beging with a null byte! */while(source_size > bwidth && source[0] == 0)
{
--source_size;
++source;
debug("skipped leading zero");
}
if(source_size % bwidth)
{
/* When we need two bytes for a character, it's strange to have an uneven bytestream length. */if(noquiet) warning2("Weird tag size %d for encoding %u - I will probably trim too early or something but I think the MP3 is broken.", (int)source_size, encoding);
source_size -= source_size % bwidth;
}
text_converters[encoding](sb, source, source_size, noquiet);
}
Generated on Fri May 25 2012 05:54:51 for ReactOS by
1.7.6.1
ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.