I made a script for locating and displaying music in my music folder (/musicdir/). I've got most of it worked out, but I still struggle when the songs which have weird characters.
Script: http://pastebin.com/uskLNNUz
A specific file which has this problem, goes by the name:
Clint Mansell – Lux Aeterna(ADЕПТ проd dnb remix)2012 (promodj.com).mp3
After the script is finished, it spits out this:
Clint Mansell � Lux Aeterna(AD??? ???d dnb remix)2012 (promodj.com).mp3
I have tried setting everything I can to utf-8, but it solved nothing. Do you need to use scandir in a special way to include weird letters? I remember I had the same problem with æ ø and å, when including filenames containing those characters in my php, on another website I designed.
Is there any way to make sure the characters go through all the way and don't get obscured?
Edit:
I have now got æøå working thanks to RamRaider, but the russian characters turning into questionmarks are still a problem.
I faced a similar issue and, like you, tried various methods to get it to display nicely and ended up using iconv. You could try something like the following to see if it meets your needs.
$value='Clint Mansell – Lux Aeterna(ADЕПТ проd dnb remix)2012 (promodj.com).mp3';
echo iconv( mb_detect_encoding( $value ), 'ASCII//IGNORE', $value );