fs functions & unicode

From: Date: Sun, 10 Nov 2002 17:49:35 +0000
Subject: fs functions & unicode
Groups: php.general 
Request: Send a blank email to php-general+get-123713@lists.php.net to get a copy of this message
Php file system functions seem to hate unicode paths or filenames. I was working on generic download script and it works fine for regular ascii(?) files but when i tried a unicode-named file it failed. $file1 = c:\blah\I've Sound [Air] $BD;$N;m(B(Lia).mp3 $file2 = c:\blah\bleh.mp3 readfile, fopen, filesize etc... fail on $file1, but succeed on $file2. consider the following: $fn = $_POST["filename"]; $enfn = urlencode($_POST["filename"]); header ("Content-type: octet/stream"); header ("Content-disposition: attachment; filename=".basename($encfn).";"); header ("Content-Length: ".filesize($fn)); //fails readfile($fn); //fails exit; is unicode support in filesystem functions non-existant or am i doing something wrong? is there a work around?

« previous php.general (#123713) next »