[ID3 Dev] Unicode

Scott Wheeler wheeler at kde.org
Sun Feb 11 21:20:52 PST 2007

On Mon, 12 Feb 2007 00:04:14 -0500 (EST), Ben Allison wrote:
> And just a note that C compilers treat literal numbers as big endian.
> So if you do this
> wchar_t BOM = 0xFEFF;
> fwrite(&BOM, 1, sizeof(BOM), fp);
> it will "do the right thing" regardless of the platform.

sizeof(wchar_t) == 4 on Mac and Windows, so you would have just written 
two bytes more than you were hoping to.  "unsigned short" is usually a 
safer 16-bit type.


To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org

More information about the ID3v2 mailing list