2012年11月21日
摘要: url传汉字出现乱码解决办法对汉字进行编码和解码页面1Response.Redirect("Default2.aspx?para1="+HttpUtility.UrlEncode("中国你好数据")+"&para2=数据的方式的");页面2this.Label1.Text = Request["para2"].ToString(); //没有解码操作this.Label2.Text = System.Web.HttpUtility.UrlDecode(Request["para1"].T 阅读全文
posted @ 2012-11-21 17:17 jameshappy 阅读(617) 评论(0) 推荐(0) 编辑
摘要: string utfinfo = getpage; string gb2312info = string.Empty; Encoding utf8 = Encoding.UTF8; Encoding gb2312 = Encoding.GetEncoding("gb2312"); // Convert the string into a byte[]. byte[] unicodeBytes = utf8.GetBytes(utfinfo); ... 阅读全文
posted @ 2012-11-21 17:13 jameshappy 阅读(1167) 评论(0) 推荐(0) 编辑