更新时间:2023-01-17 12:13:01
在阅读本文之前,我建议您快速浏览一下这个答案
Before reading this I suggest taking a quick look at this answer
对于您的具体问题,我认为这归结为未指定
AS for your specific problem I think it's down to not specifying
Response.CodePage = 65001
明确地假设它是 65001
而不检查它,然后再将 ASPForm.CharSet
属性分配给它.
explicitly and assuming it's 65001
without checking it before assigning the ASPForm.CharSet
property to it.
试试这个
<%@ Language=VBScript CodePage=65001%>
<%
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "private, no-cache, no-store, must-revalidate"
%>
<!--#include file="../includes/pure-upload.asp"-->
<%
Session.Timeout = 60
sAction = Request.querystring("a_edit")
'Make sure both IIS and the Browser know how to process the page / response
Response.CodePage = 65001
Response.CharSet = "UTF-8"
If sAction = "" Or IsNull(sAction) Then
sAction = "I" ' Display Record
else
Dim fupload: Set fupload = New ASPForm
Server.ScriptTimeout = 2000
fupload.SizeLimit = 4*1000000 'limit of size per whole form
Const fsCompletted = 0
If fupload.State = fsCompletted Then 'Completted
fupload.CharSet = Response.CharSet
x_jogadorID = fupload("x_jogadorID")
x_jogadorNome = fupload.Item("x_jogadorNome")
meukarma = fupload.CharSet
response.write x_jogadorNome & "-" & meukarma
ElseIf fupload.State > 10 then
Const fsSizeLimit = &HD
Select case fupload.State
case fsSizeLimit
Session(ewSessionMessage) = "<br><Font Color=red>Source form size (" & Form.TotalBytes & "B) exceeds form limit (" & Form.SizeLimit & "B)</Font><br>"
Session(ewSessionMessageTipo) = "error"
case else
Session(ewSessionMessage) = "<Font Color=red>Erro no Formulário." & Form.State & "</Font><br>"
Session(ewSessionMessageTipo) = "error"
end Select
End If 'Form.State = 0 then
End If
%>
<!doctype html>
<html>
<head>
<title>teste</title>
</head>
<body>
<form name="fjogadoredit" id="fjogadoredit" action="teste.asp?a_edit=U" class="form-horizontal" method="post" enctype="multipart/form-data" onSubmit="return EW_checkMyForm(this);" >
<input type="text" name="x_jogadorNome" id="x_jogadorNome" class="input-xlarge" maxlength="50" value="<%= x_jogadorNome & "" %>">
<input type="file" id="x_jogadorFotoRosto" name="x_jogadorFotoRosto" class="default">
</form>
</body>
</html>