creeperyang / id3-parser

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

A possible bug about APIC frame #19

Closed creeperyang closed 7 years ago

creeperyang commented 7 years ago

Parsed APIC frame is like:

image: 
   { type: 'cover-front',
     mime: '浩条⽥灪来',
     description: 'e',
     data: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff fe 00 3c 43 52 45 41 54 4f 52 3a 20 67 64 2d 6a 70 65 67 20 76 31 2e 30 20 28 75 73 69 ... > } }

mime seems not correct.

creeperyang commented 7 years ago

mime is Always encoded as ISO-8859, and correct result is:

{ type: 'cover-front',
     mime: 'image/jpeg',
     description: 'e',
     data: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff fe 00 3c 43 52 45 41 54 4f 52 3a 20 67 64 2d 6a 70 65 67 20 76 31 2e 30 20 28 75 73 69 ... > }