摘要: 以输入为GB18030编码字符串为例:#把全角字符串转半角def tobanjiao(string): ustring = string.decode('GB18030') rstring = "" for uchar in ustring: inside_code=ord(uchar) if inside_code==0x3000: inside_code=0x0020 else: ... 阅读全文
posted @ 2013-11-14 12:52 liyuxia713 阅读(566) 评论(0) 推荐(0) 编辑