IIS 5.0 是否需要独特的配置设置才能支持 UTF-8?

发布于 2024-09-06 11:29:51 字数 896 浏览 4 评论 0原文

[注意:我只能使用运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光倒影 2024-09-13 11:29:51

据我所知,它不需要 这些

但是 - 小心 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. ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文