Python论坛  - 讨论区

标题:[python-chinese] 中文的句号不在unicode的中文字符范围内么

2006年03月31日 星期五 09:48

imcs ee imcsee at gmail.com
Fri Mar 31 09:48:32 HKT 2006

网上看到的说中文的范围是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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年03月31日 星期五 15:00

Carlos Liu about.linux at gmail.com
Fri Mar 31 15:00:56 HKT 2006

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。

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年03月31日 星期五 15:15

imcs ee imcsee at gmail.com
Fri Mar 31 15:15:24 HKT 2006

多谢 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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号