ASCII码转换成特殊字符

#region ASCII码转换成特殊字符
                        ASCIIEncoding shuoming = new ASCIIEncoding();
                        byte[] spe1 = { 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
                        char[] special = shuoming.GetChars(spe1);
                        for (int x = 0; x < spe1.Length - 1; x++)
                        {
                            if (dtyuan.Rows[i]["说明"].ToString().IndexOf(special[x]) > 0)
                            {
                                dtyuan.Rows[i]["说明"] = dtyuan.Rows[i]["说明"].ToString().Replace(special[x], 's');
                            }
                        }
                        #endregion

posted @ 2012-07-18 09:36  大宝81  阅读(306)  评论(0编辑  收藏  举报