Y
Y
Yarik2020-04-13 23:25:26
PHP
Yarik, 2020-04-13 23:25:26

Nonsense with encoding mp3 tags in utf-8?

when parsing mp3 tags, some are displayed like this ㄀㘀⸀ ⠄㠄䀄㔀 ᨄ䀄䌄 then with question marks, but not all, there are normal ones, and the encoding in these krakozyabras is UTF-8, I tried all the ways, nothing(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nokimaro, 2020-04-14
@nokimaro

Because often there is not UTF-8, but UTF-16 in id3v2 tags is
checked through iconv
if you see a readable text, then it means there was utf-16
$tag_utf8 = iconv('UTF-16', 'UTF-8', $tag);

S
SlavikF, 2020-04-13
@SlavikF

Yes, there is such a problem.
Solved by setting / changing the parser.
I used this one for my PHP projects:
https://github.com/JamesHeinrich/getID3
And it can be configured there. Doesn't detect very well automatically.
Maybe somewhere there is a smarter one that can correctly determine automatically.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question