Clandestino
09-16-2008, 10:31 AM
Hello everybody,
I'm new to this forum, so please be kind with me. I've searched numerous resources on the web, including this one, and I couldn't find any answer or solution to my problem. Hence this humble request for assistance ;)
I have a little annoying issue with a script that has to deal with folders whose name may contain accented characters such as "é", "è", "â", "ê", ... The script displays thumbnails of pictures contained in those folders (and that part works very well).
I use the following method to access the folders:
...
g_folder = trim(request("gal"))
g_target = server.mappath("/images/galeries/" & g_folder & "/")
set fs = server.createObject("Scripting.FileSystemObject")
set fo = fs.GetFolder(g_target)
...
The "gal" querystring variable contains the name of a folder where some accented characters may be present (eg. "Prêt-à-porter", "Exemples et réalisations", ...). The script hangs on GetFolder() and returns a "Path not found" error.
All my data is encoded in UTF-8, as well as my content-type meta declaration. I've tried server.htmlencode, server.urlencode, character-by-character replacement with HTML entities, but nothing worked. I really hope I'll be able to get some help here, since this is driving me crazy. And unfortunately, moving to a database-driven solution is not an option... The user has to be able to populate the "galeries" folder and update its structure with a simple FTP application.
So thanks a million in advance!
I'm new to this forum, so please be kind with me. I've searched numerous resources on the web, including this one, and I couldn't find any answer or solution to my problem. Hence this humble request for assistance ;)
I have a little annoying issue with a script that has to deal with folders whose name may contain accented characters such as "é", "è", "â", "ê", ... The script displays thumbnails of pictures contained in those folders (and that part works very well).
I use the following method to access the folders:
...
g_folder = trim(request("gal"))
g_target = server.mappath("/images/galeries/" & g_folder & "/")
set fs = server.createObject("Scripting.FileSystemObject")
set fo = fs.GetFolder(g_target)
...
The "gal" querystring variable contains the name of a folder where some accented characters may be present (eg. "Prêt-à-porter", "Exemples et réalisations", ...). The script hangs on GetFolder() and returns a "Path not found" error.
All my data is encoded in UTF-8, as well as my content-type meta declaration. I've tried server.htmlencode, server.urlencode, character-by-character replacement with HTML entities, but nothing worked. I really hope I'll be able to get some help here, since this is driving me crazy. And unfortunately, moving to a database-driven solution is not an option... The user has to be able to populate the "galeries" folder and update its structure with a simple FTP application.
So thanks a million in advance!