Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(again) false UTF-16 <BOM> and no termination strings #189

Closed
kuerbis42 opened this issue Jun 9, 2019 · 4 comments
Closed

(again) false UTF-16 <BOM> and no termination strings #189

kuerbis42 opened this issue Jun 9, 2019 · 4 comments

Comments

@kuerbis42
Copy link

Hi James,
after writing my own little class - 'cause I didn't found your class :-( - I've had the same issue with UTF-16 and BOM.

Now I installed your class to try it out (07.06.19) and I tried it with my "favorit malformed mp3" files.
When I make a hexdump to that mp3, the follwing values are found:
.. .. 54 41 4C 42 00 00 00 03 00 00 01 FF FE 43 4F 4D 4D 00 00 00 08 00 00 01 00 00 00 00 00 FF FE 00 00 .. ..
These are the following frames:
TALB (len 3)(no flags) 0x01 0xFF 0xFE
directly followed by
COMM (len 8)(no flags) 0x01 0x00 0x00 0x00 0x00 0x00 0xFF 0xFE

For my class, I specially check on (yes, this is not a valid php-code ;-)
strlen($value)==3 && ($value=="0x01 0xFF 0xFE"||$value=="0x01 0xFE 0xFF") (check encoding and <BOM>)
and if true, there is no termination and I clear the $value.
You did similar here: ID3v2 remove BOM from frame descriptions

If I check this mp3 with your class, I get

album | array (1) | 0 string (2) ��
comment | array (1) | 0 string (2) ��

so, your fix doesn't work here (in this mp3 there are a few more in the returned array) - If you need it for exam, I'll send you a PM.
Greets, Frank

@JamesHeinrich
Copy link
Owner

Please send me a sample file to info@getid3.org

@kuerbis42
Copy link
Author

Did you get the sample?

@JamesHeinrich
Copy link
Owner

I did receive the sample, thank you. I have not had a chance to look at it yet, but I will.

@JamesHeinrich
Copy link
Owner

Should be fixed in 59ded88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants