IIS 5.0 是否需要独特的配置设置才能支持 UTF-8?
[注意:我只能使用运行 IIS 5.0 的 Win2k Web 服务器重现此问题。我无法使用运行 IIS 5.1 的 Windows XP Web 服务器 (localhost) 重现此问题。]
我发现了很多与 UTF-8 编码相关的信息。
如果我学到了一件事,那就是 这个。
编辑:MSDN 为 IIS 5.0 及更早版本提供了该功能,Response.CodePage 不可用。目前,我无法验证这是否是我的问题的根源。
说了这么多,我的问题是:
IIS 5.0是否需要独特的配置设置才能支持 UTF-8?
我问的原因:尽管我尽了最大努力听取了 Google 和 SO 的所有建议,但我仍然无法将 UTF-8 字符正确发布到服务器。
这是我的场景:
- 将 UTF-8 编码的 unicode 字符串渲染到屏幕上。 [工作正常,通过目视检查验证。]
- 使用 javascript,将这些 UTF-8 编码的 unicode 字符串存储在表单变量中。 [工作正常,已通过 Firebug 验证。]
- 发布到同一网页。 [页面发布后,服务器上的特殊字符会被损坏。]
[Note: I can only reproduce this issue with a Win2k web server running IIS 5.0. I can't reproduce this issue with a Windows XP web server (localhost) running IIS 5.1.]
I've uncovered a lot of information pertinent to UTF-8 encoding.
If I've learned one thing, it's this.
EDIT: MSDN offered that for IIS 5.0 and earlier, Response.CodePage is not available. At this time, I cannot verify that this is the root of my problem.
With all of that being said, here's my question:
Does IIS 5.0 Require Unique Configuration Settings To Support UTF-8?
Reason I ask: In spite of my best efforts to heed all of the advice from Google and SO, I still can't get UTF-8 characters to post to the server correctly.
Here's my scenario:
- Render UTF-8 encoded unicode strings to the screen. [Works fine, verified by visual inspection.]
- With javascript, store these UTF-8 encoded unicode strings in form variables. [Works fine, verified with Firebug.]
- Post to the same web page. [Special characters get corrupted on the server after the page has been posted.]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,它不需要 这些。
但是 - 小心 VBScript! 就我而言, IIS 5.0 上的 VBScript 损坏了 Unicode 字符。
Reponse.Write
是你的朋友。 ;)To my knowledge, it doesn't require any unique settings outside of these.
HOWEVER - Beware of VBScript!!! In my case, VBScript on IIS 5.0 mangled Unicode characters.
Reponse.Write
is your friend. ;)