First of all i'm a korean and when i pull out datas from mp3 file. korean characters come out as weird characters.. what is it called in english? breaking chracter phenomenon? anyway There are music files which are mp3 types and I made it to pull out mp3 informations. (title,lyric,artist,album,picture) my problem is that some files come out properly not broken at all. But some files come out incorrectly. you know what is funny the lyric comes out properly but not title,artist name,album which is written in korean. the lyric is also korean. so i compared one file which came out correctly to the other one which came out funny. the encoding is different from each other so i changed it to the same as the one that come out correctly. It didn't work. What am i supposed to do and what's the problem .. if anybody knows about it ? I tried out UTF-8 , UTF-16 , EUC- KR and so on.. is it a matter of encoding?
Asked
Active
Viewed 520 times
0
-
1How do you pull out the data from the MP3? If you are using a shell command make sure that it outputs data in the same encoding as the script. What do the output look like? If the script is UTF-8 and you are using a shell command which returns another charset you can use utf8_encode() to convert it to UTF-8 – datagutten May 20 '17 at 08:32
2 Answers
0
You may start analysis form an enviroment on the server site by using http://www.getid3.org/ Example: http://www.getid3.org/demo/MPEG.mp3.html
Then you have a chance to convert e.g using mbsting functions with php.

f b
- 115
- 10
0
for Korean :
$url = "music/악동뮤지션(AKMU) - DINOSAUR.mp3";
$tag = id3_get_tag($url);
echo iconv("EUC-KR","UTF-8", $tag['artist']).' - '.iconv("EUC-KR","UTF-8", $tag['title']);
result : 악동뮤지션(AKMU) - DINOSAUR
for English :
$url = "music/Ed Sheeran - Shape Of You.mp3";
$tag = id3_get_tag($url);
echo iconv("UTF-16LE","UTF-8", $tag['artist']).' - '.iconv("UTF-16LE","UTF-8", $tag['title']);
result : Ed Sheeran - Shape Of You

Neibce
- 231
- 2
- 5