Page 1 of 1

BOM showing as text in TXXX tag description

Posted: Tue Oct 14, 2014 10:46 pm
by fluxus
I have some files encoded in UTF-16 and if I check the frame headers of the TXXX tags, the encoding byte is set to 01.
encoding.jpg
encoding.jpg (31.07 KiB) Viewed 16282 times
But when getid3 reads the TXXX tags, it shows the bom before the text description. I don't think it's the tagger - tried both mp3tag and picard. Here it is in mp3tag showing the charset and the extended tags:
tags.jpg
tags.jpg (116.05 KiB) Viewed 16282 times
and here is the output from demo.basic.php:
bom1.jpg
bom1.jpg (50.34 KiB) Viewed 16282 times
Xampp 1.8.3
getID3 version: 1.9.8-20140511
OS: Win7 x86
Chrome

Re: BOM showing as text in TXXX tag description

Posted: Wed Oct 15, 2014 1:35 am
by James Heinrich
If you could supply a sample file (post link here, or send link via PM or email) that would be helpful.

Re: BOM showing as text in TXXX tag description

Posted: Thu Oct 16, 2014 1:50 am
by James Heinrich
Thanks for the sample file. I believe I see the problem you describe, however I'll need to take a closer look at the file contents and the ID3v2 specs and get back to you with a patch.

Re: BOM showing as text in TXXX tag description

Posted: Fri Oct 17, 2014 3:19 pm
by James Heinrich
Very simple fix (translate encoding of the frame description to local encoding), it was just a matter of finding the right place to put it.
https://github.com/JamesHeinrich/getID3 ... 71c91bd7fe