gb2312表单提交到utf-8的aspx中怎么样正确接受中文?
小弟最近在做一个单点登陆系统,用aspx开发。以前的系统有utf-8和gb2312的。在这些系统里面提交用户名密码到我的aspx单点登陆系统进行验证。
<globalization fileEncoding ="utf-8" requestEncoding ="utf-8" responseEncoding ="utf-8"/>,修改这个成gb2312的话那么原来的utf-8系统就不好用了
Encoding gb2312 = Encoding.GetEncoding("gb2312");
Response.ContentEncoding = gb2312;
这个好像也不好用
请帮忙
-----------------------------
loginBG.htm
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<form method="post" action="form.aspx">
<input type="text" name="name" id="name">
<input type="submit">
</form>
-----------------------------
loginUTF8.htm(高级保存成utf-8编码)
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<form method="post" action="form.aspx">
<input type="text" name="name" id="name">
<input type="submit">
</form>
------------------------------
form.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Request["name"]);
}
不行也可以使用formGB.aspx接收loginGB.htm参数,而使用formUTF8.aspx接收loginUTF8.htm参数。只要能解决就好