访问量: 29006次,访客数: 24488人,浏览量: 1次 
首页  编辑  

字符编码转换

Tags: /C#/字符串处理/   Date Created: Tue Jun 10 2008 01:17:56 GMT+0000 (Coordinated Universal Time)

byte [] vBytes = Encoding . Convert( Encoding . UTF8,

        Encoding . GetEncoding( "GB2312" ), Encoding . UTF8 . GetBytes(S));

//or

byte [] vBytes = ASCIIEncoding . Default . GetBytes(mStr);