HtmlEncode UTF-8 [英] HtmlEncode UTF-8
问题描述
我在asp-classic的utf-8字符串中使用Server.HtmlEncode,它可以正常工作,直到字符串中有一些重音符。 RüstüRecber,出现作为RérstüRecber(Rü stü Recber在源)。
I'm using Server.HtmlEncode on a utf-8 string in asp-classic, which works fine until there are some accents in the string e.g. Rüstü Recber, which appears as Rüstü Recber (Rüstü Recber in the source).
我已经尝试将Response.Charset属性设置为utf-8,但这没有任何区别。
I've tried setting the Response.Charset property to utf-8 but this doesn't make any difference.
推荐答案
更新已解决):在页面开头添加<%@ CODEPAGE = 65001%>( http://technet.microsoft.com/en-us/library/bb742422.aspx )
Update (Solved): Adding <%@CODEPAGE=65001%> at the start of the page corrected the problem (http://technet.microsoft.com/en-us/library/bb742422.aspx)
非常感谢所有建议。
这篇关于HtmlEncode UTF-8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!