c#怎么把某个繁体字变为简体字 c#怎么把某个繁体字变为简体字页面显示的是繁体字,但数据库的是简体字, 我怎么用C#把繁体字变为简体,才能读取数据库的数据 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 那你将页面的编码格式更改成gb2312,最好是同一成UTF-8 汗汗 你这个要求 太那个了 不过还是有解决办法的 直接把简体的和繁体的转换下就好了 ~~~~至于转换的代码 网上很多 这里 http://blog.csdn.net/marvinhong/archive/2008/11/03/3211702.aspx //简体转繁体 private static string getBig5(string gb2312) { string result = ""; if ((gb2312 != null) && (gb2312 != String.Empty)) { gb2312 = gb2312.Trim(); result = Strings.StrConv(gb2312, VbStrConv.TraditionalChinese, 0); } return result; } //繁体转简体 private static string getGb2312(string big5) { string result = ""; if ((big5 != null) && (big5 != String.Empty)) { big5 = big5.Trim(); result = Strings.StrConv(big5, VbStrConv.SimplifiedChinese, 0); } return result; } //引用Miscrosoft.VisualBasicusing Microsoft.VisualBasic;public static string Traditional2Simplified(string str) { //繁体转简体 return (Strings.StrConv(str, VbStrConv.SimplifiedChinese, 0)); } public static string Simplified2Traditional(string str) { //简体转繁体 return (Strings.StrConv(str as String, VbStrConv.TraditionalChinese, 0)); } 操作了fileurl = "<a href='/Admin/PlanUploadFile/" + Big5ToGb2312.getGb2312(fileList[i].FileName) + "' target='_blank'>" + fileList[i].FileName + "</a>"; myfileList.Add(fileurl);繁体的还是 没有变成简体,没有发生变化。 怎么不行的呢 本来我页面时 UTF-8的 但是在VS2008看的文字是简体的,但浏览运行时 页面上显示的文字 竟然是繁体的。为什么会这样的呢? 怎么变化这样的呢了。 ASP.NET 同时获得存储过程返回的记录集和数值两种数据 剩下的分 求解 xml内容显示 实在没有什么分数了呀!!!那个进来帮我下 急!!我这样写有错误,吗? DropDownList怎么可以输入? 如何实现从一个页面获取另一个页面的中的信息 怎样在.net中用编程的方式修改xml文件中的标记?请教高手,跪求! 怎么样用MSDE去创建数据库啊? 急啊,送份,在一个label中显示所在页的aspx文件名 ASP.NET html服务器控件button单击事件被触发两次的问题 简单问题,高分送出 关于asp。net 的模板 求ASP.NET静态页面生成及分页的实现代码
http://blog.csdn.net/marvinhong/archive/2008/11/03/3211702.aspx
private static string getBig5(string gb2312)
{
string result = "";
if ((gb2312 != null) && (gb2312 != String.Empty))
{
gb2312 = gb2312.Trim();
result = Strings.StrConv(gb2312, VbStrConv.TraditionalChinese, 0);
}
return result;
} //繁体转简体
private static string getGb2312(string big5)
{
string result = "";
if ((big5 != null) && (big5 != String.Empty))
{
big5 = big5.Trim();
result = Strings.StrConv(big5, VbStrConv.SimplifiedChinese, 0);
}
return result;
}
{ //繁体转简体
return (Strings.StrConv(str, VbStrConv.SimplifiedChinese, 0)); }
public static string Simplified2Traditional(string str)
{ //简体转繁体
return (Strings.StrConv(str as String, VbStrConv.TraditionalChinese, 0)); }
myfileList.Add(fileurl);繁体的还是 没有变成简体,没有发生变化。 怎么不行的呢
为什么会这样的呢? 怎么变化这样的呢了。