meta-audio icon indicating copy to clipboard operation
meta-audio copied to clipboard

Update Id3v2.php

Open za-ek opened this issue 3 years ago • 5 comments

utf8_encode corrupts cp1251 strings

za-ek avatar Nov 03 '22 12:11 za-ek

Hi @za-ek, thanks for your PR but I'm afraid this breaks the functionality of the library (if you run the unit tests you'll see Id3v2Test::testUtf16WithoutBom fails).

Please can you provide a unit test demonstrating the issue you're experiencing, then we can find the best way to fix it without introducing any regressions

duncan3dc avatar Nov 03 '22 15:11 duncan3dc

ah sorry I didn't see there is a test folder. Do you mean I make a PR with a test?

za-ek avatar Nov 03 '22 15:11 za-ek

Do you mean I make a PR with a test?

You can just push it to this PR, or if you're struggling with a test just any script/snippet I can use to reproduce the problem you're trying to fix

duncan3dc avatar Nov 03 '22 15:11 duncan3dc

I add mp3 file and test so now you can reproduce the problem

za-ek avatar Nov 03 '22 16:11 za-ek

btw you can add this line after line 166 in Id3v2.php file to fix test you mentioned:

$value = Bom::removeBom($value);

za-ek avatar Nov 03 '22 16:11 za-ek