怎么可能ASP服务器端code腐败的一个聪明的报价“? [英] How could ASP server-side code corrupt a smart quote ’?
问题描述
我的公司刚转换的列从varchar nvarchar的到
My company just converted many columns from varchar to nvarchar.
现在看来,当我们呈现一个聪明的报价(即ALT + 0146')到屏幕上,然后将其发送回SQL Server 2000数据库进行持久化,智能报价被破坏到 - 一个™€ -
Now it seems that when we render a smart quote (i.e. ALT+0146 ’) to the screen and then send it back to the SQL Server 2000 database for persistence, the smart quote gets corrupted to - ’ -.
我的问题:
怎么可能ASP服务器端code腐败的一个聪明的报价?
How could ASP server-side code corrupt a smart quote ’ ?
编辑:看来,我的问题是类似<一个href=\"http://stackoverflow.com/questions/175785/how-do-i-convert-word-smart-quotes-and-em-dashes-in-a-string\">this 之一。顺便说一句,简报内容介绍了智能报价混进去。但正如我之前说的,我处理ASP页,而引用的问题涉及到一个PHP页面。
It appears that my question is similar to this one. Incidentally, Powerpoint content introduced the smart quote into the mix. However as I said before, I'm dealing with an ASP page, whereas the referenced question pertains to a PHP page.
修改:服务器端指令 codePAGE = 65001
使得页面的渲染的正确,但它仍然在Windows 2000机器的帖子的内容为西欧。有谁知道为什么吗?
EDIT: The server-side directive CODEPAGE=65001
makes the page render correctly, but it still posts content as 'Western European' on a Windows 2000 box. Does anyone know why?
推荐答案
VBScript中可能裂伤的统一code字;尤其是在旧版本的IIS(即在Windows Server 2000上的IIS 5.0)。
VBScript might mangle the Unicode characters; especially on older versions of IIS (i.e IIS 5.0 on Windows Server 2000).
在我的情况下,对于每个
构造是罪魁祸首。
In my case, a For Each
construct was to blame.
下面是一些例子code,一个POST后执行:
Here's some example code that executes after a POST:
Response.Write Request.Form("selOptions")(0) ' A-OK! - Displays Unicode characters fine!
For Each sOption in Request.Form("selOptions")
Response.Write sOption ' Bad! Unicode characters are mangled!
Next
一如往常,你的里程可能会有所不同。
As always, your mileage may vary.
这篇关于怎么可能ASP服务器端code腐败的一个聪明的报价“?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!