aspx文件编码不统一导致乱码

今天在将一个旧的MIS系统升级到VS2008时,发现了一个很奇怪的现象,有些页面乱码,而有些則不会.
所有页面在VS2008下面都是可以正常显示的,一点问题也没有.

上网查找了很多方法均不能解决,根据以前开始asp,php的经验,怀疑这些页面的编码可能不一样.在VS2008下面还真的不知道在哪里看文件的编码,没有办法,只好安装了一个Dreamweaver CS3来暂时用一下.打开一个乱码跟一个不乱码的页面对比了一下,发现一个是gb2312(不乱码),而别外一个则是utf-8(不乱码).在Dreamweaver (修改->页面属性->编码)改为gb2312后,所有页面均正常显示了.

这可能是VS2008的一个bug,也可能跟我安装的vista有关系.

This entry was posted in ASP.NET and tagged , , . Bookmark the permalink.

One Response to aspx文件编码不统一导致乱码

  1. forefront says:

    请问你是把所有文件通过站点管理的方式来实现批量转换吗?

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word