We have a file uploading script; it works fine with regular filenames;
however, when uploading filenames with utf8 characters (ex, chinese, japanese), the files are saved with weird characters.
here is our form:
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="process.asp" accept-charset="UTF-8">
<input type=file name="FILE1">
The script processing this file is (relevant section):
Session.CodePage = 65001
Response.CharSet = "UTF-8"
Set oFS = Server.CreateObject("Scripting.FileSystemObject")
Set oFile = oFS.CreateTextFile(sPath & Filename,true)
When I do response.write File.FileName it displays the correct chinese characters to the browser.
However, when I actually look at the file created on the server, I am seeing weird characters like: å‚ä¼šä»£è¡¨2.JPG
Any advice would be much appreciated,