I'm have made a upload page in classic asp and it works fine, as long as the filenames are not in utf-8 characters. I have added charset til the page and the form accepts utf-8 characters but my files are saved as Доклад Региона.pdf
bug should be Доклад Региона.pdf
I don't know if there is anything more I can do or it is the "Pure-ASP file upload" that does not support utf-8 characters. Does anyone how to fix it?
My asp page looks like this
<%
Response.CodePage = 65001
Response.CharSet = "utf-8"
'Create upload form
'Using Huge-ASP file upload
'Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
'Using Pure-ASP file upload
Dim Form: Set Form = New ASPForm %><!--#INCLUDE FILE="upload2.asp"--><%
dim File
DestinationPath = Server.mapPath("Files")
If Form.State = 0 Then 'Completted
For Each File In Form.Files.Items
If Len(File.FileName) > 0 Then
Form.Files.Save DestinationPath
End If
Next
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Project Site</title>
<link id="ss__cs" rel="stylesheet" href="CSS/stylesheet.css" type="text/css"/>
</head>
<body style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding: 0;" >
<form method="POST" id="myform" ENCTYPE="multipart/form-data" acceptcharset="UTF-8">
<table>
<tr>
<td>File</td>
<td><input type="file" id="File1" name="File1" class="defaultfont"></td>
</tr>
<tr height="10">
</tr>
<tr>
<td></td>
<td><input Value="Cancel" Type="button" class="defaultfont" onclick="window.close()"> <input Value="Upload file" Type="submit" class="defaultfont" ></td>
</tr>
</table>
</Form>
</body>
</html>
Try adding
For more information see Upload - use unicode (utf-8) character set for request/response data .