2006年03月31日 星期五 09:48
网上看到的说中文的范围是u'\u4e00' < 到 >> uniword = '中'.decode('cp936') >>> uniword u'\u4e2d' >>> u'\u4e00' < uniword True >>> uniword = '。'.decode('cp936') >>> uniword u'\u3002' >>> u'\u4e00' < uniword False -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060331/b35200a9/attachment.html
2006年03月31日 星期五 15:00
On Fri, Mar 31, 2006 at 09:48:32AM +0800, imcs ee wrote: > 网上看到的说中文的范围是u'\u4e00' < 到 > > >>> uniword = '中'.decode('cp936') > >>> uniword > u'\u4e2d' > >>> u'\u4e00' < uniword > True > >>> uniword = '。'.decode('cp936') > >>> uniword > u'\u3002' > >>> u'\u4e00' < uniword > False 全角句号属于 CJK Symbols and Punctuation 范围,从 u+3000 到 u+303F。 一般的中文字符属于 CJK Unified Ideographs。
2006年03月31日 星期五 15:15
多谢 Cralos Liu,我本来是想先得到中文,然后把里面的中文标点再区分出来,没想到,本来就是分开的...省事了。 On 3/31/06, Carlos Liu <about.linux at gmail.com> wrote: > > On Fri, Mar 31, 2006 at 09:48:32AM +0800, imcs ee wrote: > > 网上看到的说中文的范围是u'\u4e00' < 到 > > > > >>> uniword = '中'.decode('cp936') > > >>> uniword > > u'\u4e2d' > > >>> u'\u4e00' < uniword > > True > > >>> uniword = '。'.decode('cp936') > > >>> uniword > > u'\u3002' > > >>> u'\u4e00' < uniword > > False > > 全角句号属于 CJK Symbols and Punctuation 范围,从 u+3000 到 u+303F。 > 一般的中文字符属于 CJK Unified Ideographs。 > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060331/bff1324d/attachment.html
Zeuux © 2025
京ICP备05028076号