0

我通过 post 选项从输入中获取字符串

Replace(string, "Č", "C")

不起作用,因为函数无法从变量(Request.Form(“文件夹”))中识别“Č”字符。

我使用 for 循环和这个函数从字符串中获取字符

strChar = mid(someString,i,1)

我可以使用

If Asc(strChar) = -15220  Then  'Č
   string = string + "C"

但并不总是有效。我认为因为 'Č' 某种方式,如果使用 mid() 函数,则使用多个字符。

还有其他解决方案吗?

4

1 回答 1

0

试试这个:把这个放在你的 ASP 代码上:

Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CodePage = 65001
Response.CharSet = "UTF-8"

在您的 HTML 代码中:

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
于 2012-07-19T07:52:43.133 回答