RE: [PHP] Use of special characters in filenames results in IE problems
| From: | Diego Fulgueira | Date: | Fri, 20 Apr 2001 16:36:49 +0000 |
| Subject: | RE: [PHP] Use of special characters in filenames results in IE problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49588@lists.php.net to get a copy of this message | ||
The is no function that i know specific to do that. But you can work it out
with a RegExp. Try:
$fileName=ereg_replace("_", "[^A-Za-z0-9_%]", $fileName);
Cheers!!
-----Original Message-----
From: Floyd Piedad [mailto:piedad@akasia.com]
Sent: Thursday, 19 April, 2001 11:24 PM
To: dful@metahogar.com
Cc: php-general@lists.php.net
Subject: [PHP] Use of special characters in filenames results in IE
problems
Hi,
I discovered a bug in my program for uploading files, which stores the
filename in the database in order to create a link for it on the web page in
the future. The bug is when the filename makes use of special characters
(e.g. Oplæg). When I create a link to the file, the link works with
Netscape. With IE however, it says that file is not found. I discovered
that
if I use the "encoded" version of the file name ("Opl%e6g") it works on both
IE and Netscape. What function or code is used to convert to this format?
Thanks!
Floyd