using System; using System
Text; namespace CN
SMSLib { /// /// By popcorn 2004
/// cnpopcorn@hotmail
com /// public class CNText { public CNText() { } /// /// 编码格式 /// public enum GSMCode { Bit7=0, Bit8=1, UCS2=2 } /// /// 对整个短信息进行解码 /// /// 要解码的信息 /// 解码后的电话号码 /// 解码后的短信内容 /// 短信时间戳 /// 使用的编码方式 /// 成功返回true static public bool DecodingMsg(string s,ref string phone,ref string text,ref DateTime sendTime,ref GSMCode code,ref string SCA) { try { //短信息中心 int iLength=int
Parse(s
Substring(0,2),System
Globalization
NumberStyles
AllowHexSpecifier); if(iLength>0) { if(s
Substring(2,2)=="91") { SCA+="+"; iLength--; } for(int i=0;i