Discussion:
BOMS for multiple string fields ?
Paul Taylor
2010-04-19 11:33:41 UTC
Permalink
If have a text frame with multiple strings, stored as a null separated
list, where null is represented by the termination code for the
character encoding how do you encode type 01 (UTF-16 [UTF-16] encoded
Unicode [UNICODE] with BOM) Do you write BOM for each string or just at
the start of the total string

i.e

Say just have the single char string twice (0xDE 0x03)

Should BOM be written for both strings

0xFF 0xFE 0xDE 0x03 0x00 0x00 0xFF 0xFE 0xDE 0x03

or just at the start of the total string

0xFF 0xFE 0xDE 0x03 0x00 0x00 0xDE 0x03

(null separator should be written for all fields except last one)

Paul
Mathias Kunter
2010-04-24 11:36:01 UTC
Permalink
Well, the specification says: "UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All strings in the same frame SHALL have the same byteorder."

Therefore:
1) Strings in the same frame MAY have different byteorder.
2) To encode different byteorder strings, each string MUST have a BOM.
3) In order to be consistent with 2), also encode same byteorder strings with a BOM for each string.

Using a BOM for each string also is the solution which should be most compatible with other ID3 implementations, since no UTF-16 compliant ID3 implementation should ignore the BOM of any string.

Mathias K.





________________________________
Von: Paul Taylor <***@fastmail.fm>
An: ***@id3.org
Gesendet: Montag, den 19. April 2010, 13:33:41 Uhr
Betreff: [ID3 Dev] BOMS for multiple string fields ?

If have a text frame with multiple strings, stored as a null separated list, where null is represented by the termination code for the character encoding how do you encode type 01 (UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM) Do you write BOM for each string or just at the start of the total string

i.e

Say just have the single char string twice (0xDE 0x03)

Should BOM be written for both strings

0xFF 0xFE 0xDE 0x03 0x00 0x00 0xFF 0xFE 0xDE 0x03

or just at the start of the total string

0xFF 0xFE 0xDE 0x03 0x00 0x00 0xDE 0x03

(null separator should be written for all fields except last one)

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-***@id3.org
For additional commands, e-mail: id3v2-***@id3.org

Loading...