creeperyang / id3-parser

A pure JavaScript id3 tag parser.
54 stars 13 forks source link

{'user-defined-text-information': '哾愀最最椀渀最 琀椀洀攀',} looks incorrectly parsed. #20

Closed creeperyang closed 6 years ago

creeperyang commented 7 years ago

A possible bug with user defined text information frame.

creeperyang commented 6 years ago

Spec for TXXX structure:

<Header for 'User defined text information frame', ID: "TXXX" >
Text encoding    $xx
Description < text string according to encoding > $00(00)
Value < text string according to encoding >

And TXXX spec allows multiple TXXX frames with different description. SO we should cover this case.

A real TXXX frame data is like:

<Buffer 54 58 58 58 00 00 00 45 00 00 01 ff fe 54 00 61 00 67 00 67 00 69 00 6e 00 67 00 20 00 74 00 69 00 6d 00 65 00 00 00 ff fe 32 00 30 00 31 00 32 00 2d ... >

After parsed, the correct data should be:

'user-defined-text-information': [ { description: 'Tagging time', value: '2012-07-17T05:28:12' } ],