I have a problem with reading from the local disk in a PHP jukebox app ive been working on for a couple months. Im posting on this forum in the hope that some reader has encountered this issue before and can resolve it once and for all! Searching the web only returned one answer, and that was not a desirable one - wait for php6..
This issue only applies to Linux (Debian etch) and OSX, running PHP 5.2.4. The issues does not appear on Windows.
Im reading a local file structure which contains mp3's and then displaying them in the browser, where the user can click each track to add it to a playlist. There's a java mp3 player part of the app which runs on the same server to handle the audio.
The problem is that directories/files which include non-ascii characters aren't read correctly by PHP. Here is an example, the first 2 lines may be the same - if you copy-paste out into a text editor you will see the difference. The second line denotes the unicode decimals for each string, and the third line is built from HTML entities using the unicode values. This will enable your browser to display a representation what PHP reads from my disk.
/mp3/Björk/
66 106 246 114 107
Code: Select all
B j ö r k/mp3/Björk/
Code: Select all
B j o ̈ r kI am using utf-8 encoding through out my application, this problem only exists when reading from the disk!
I can also provide some of my PHP test scripts should anyone like to attempt to solve this issue on their local machine..
Thanks for any/all help or suggestions.
mafro