Python论坛  - 讨论区

标题:[python-chinese] Any easy way to check if a string containsatleast one Chinese character?

2004年03月12日 星期五 10:10

zhao bear_sh at eastday.com
Fri Mar 12 10:10:00 HKT 2004

Anthony Liu,ÄúºÃ£¡

	要的就是4e00
和9fff。多谢。
帮我看看那个书名号的问题?

Ôõô¶¼ÊÇÕâÑùµÄ×Ö·û£¿£¿

======= 2004-03-12 08:57:35 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======

>要的就是4e00
>和9fff。多谢。
>帮我看看那个书名号的问题?
>
>--- "Zoom.Quiet" <zoomq at infopro.cn> wrote:
>> Hello Anthony,
>> 
>> 先转化为utf-8 的
>> 然后
>> 测试是否有U+4E00
>到 U+9FFF
>之间的字符就好!
>> 
>> GB Big5
>都分布在其中!
>> 
>> 
>> === [ 2:44 ; 04-03-12 ] you wrote:
>> 
>> AL> Hi, Jacob,
>> 
>> AL> The encoding is gbk. Any idea?
>> 
>> AL> --- Jacob Fan <jacob at exoweb.net> wrote:
>> >> It depends on which encoding the file use ...
>> >> 
>> >> -------
>> >> Explicit is better than implicit ... 
>> >> 
>> >> -----Original Message-----
>> >> From: Anthony Liu
>> [mailto:antonyliu2002 at yahoo.com] 
>> >> Sent: 2004年3月11日 19:01
>> >> To: pycn
>> >> Subject: [python-chinese] Any easy way to check
>> if a
>> >> string contains atleast one Chinese character?
>> >> 
>> >> 
>> >> My python code will keep reading strings from a
>> disk
>> >> file.
>> >> 
>> >> I wanna check if each string I read contains at
>> >> least
>> >> one Chinese character.
>> >> 
>> >> Any easy way like theString.hasChinese()?
>> >> _______________________________________________
>> >> python-chinese list
>> >> python-chinese at lists.python.cn
>> >> http://python.cn/mailman/listinfo/python-chinese
>> 
>> 
>> AL> __________________________________
>> AL> Do you Yahoo!?
>> AL> Yahoo! Search - Find what you抮e looking
>for
>> faster
>> AL> http://search.yahoo.com
>> 
>> === === === === === === === === === === 
>> 
>> -- 
>> Best regards,
>>  Zoom.Quiet                            
>> 
>>  /=======================================\
>> ]Time is unimportant, only life important![
>>  \=======================================/
>> 
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Search - Find what you’re looking for faster
>http://search.yahoo.com
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>

= = = = = = = = = = = = = = = = = = = =
			

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡
 
				 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡zhao
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡bear_sh at eastday.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-03-12

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fox.gif
Type: image/gif
Size: 9519 bytes
Desc: not available
Url : http://lists.exoweb.net/pipermail/python-chinese/attachments/20040312/f6e70cb2/fox.gif

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

2004年03月12日 星期五 10:23

Who Bruce whoonline at msn.com
Fri Mar 12 10:23:50 HKT 2004

我用过unicode版的wxPython,如果中文不编码为Unicode,则显示出来的都是乱码。还
是非unicode版的比较好用。

>From: "Zoom.Quiet" <zoomq at infopro.cn>
>Reply-To: "Zoom.Quiet" <zoomq at itcase.com>, zoomq at infopro.cn, 
,python-chinese at lists.python.cn
>To: python-chinese at lists.python.cn
>Subject: Re[4]: [python-chinese] Python 新手几个问题。
>Date: Fri, 12 Mar 2004 08:28:50 +0800
>
>Hello John,
>
>sorry 在下只有理论,没有具体实践过,
>
>不过从使用过的几种Python 开发的编辑工具来看,
>编辑容器一定要是utf-8 的才容易兼容中文的,
>paste 不回去,就因为容器不识别吧!
>
>=== [ 1:00 ; 04-03-12 ] you wrote:
>
>JL> 请问,你使用unicode吗?我的经验是,用unicode的wxPython,
>JL> paste中文不对。你有什么经验?
>
> >> 如果使用 wxPython则 Clipboard 操作类似:
> >> """
> >> def OnPaste(self, event):
> >>         do = wxTextDataObject()
> >>         wxTheClipboard.Open()
> >>         success = wxTheClipboard.GetData(do)
> >>         wxTheClipboard.Close()
> >>         if success:
> >>             pastedLines = LineSplitter(do.GetText())
> >>         else:
> >>             wxBell()
> >>             return
> >>         if len(pastedLines) == 0:
> >>             wxBell()
> >>             return
> >>         elif len(pastedLines) == 1:
> >>             self.SingleLineInsert(pastedLines[0])
> >>         else:
> >>             self.MultipleLinePaste(pastedLines)
> >> """
> >>
>
>JL> _______________________________________________
>JL> python-chinese list
>JL> python-chinese at lists.python.cn
>JL> http://python.cn/mailman/listinfo/python-chinese
>
>=== === === === === === === === === ===
>
>--
>Best regards,
>  Zoom.Quiet
>
>  /=======================================\
>]Time is unimportant, only life important![
>  \=======================================/
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  



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

2004年03月12日 星期五 10:31

Who Bruce whoonline at msn.com
Fri Mar 12 10:31:25 HKT 2004

IIRC,someone has given an example on the bbs of www.dohao.org.


>From: Anthony Liu <antonyliu2002 at yahoo.com>
>Reply-To: python-chinese at lists.python.cn
>To: python-chinese at lists.python.cn
>Subject: RE: [python-chinese] Any easy way to check if a string 
containsatleast one Chinese character?
>Date: Thu, 11 Mar 2004 10:44:16 -0800 (PST)
>
>Hi, Jacob,
>
>The encoding is gbk. Any idea?
>
>--- Jacob Fan <jacob at exoweb.net> wrote:
> > It depends on which encoding the file use ...
> >
> > -------
> > Explicit is better than implicit ...
> >
> > -----Original Message-----
> > From: Anthony Liu [mailto:antonyliu2002 at yahoo.com]
> > Sent: 2004Äê3ÔÂ11ÈÕ 19:01
> > To: pycn
> > Subject: [python-chinese] Any easy way to check if a
> > string contains atleast one Chinese character?
> >
> >
> > My python code will keep reading strings from a disk
> > file.
> >
> > I wanna check if each string I read contains at
> > least
> > one Chinese character.
> >
> > Any easy way like theString.hasChinese()?
> > _______________________________________________
> > python-chinese list
> > python-chinese at lists.python.cn
> > http://python.cn/mailman/listinfo/python-chinese
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Search - Find what you’re looking for faster
>http://search.yahoo.com
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  http://messenger.msn.com/cn  



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

2004年03月12日 星期五 10:36

Jacob Fan jacob at exoweb.net
Fri Mar 12 10:36:31 HKT 2004

=C7=EB=BF=B4=D5=E2=C0=EF:
http://www.linuxbyte.net/view.php?skin=3Dart&ID;=3D3217
=D5=E2=C0=EF=D3=D0GBK=BA=CDBig5=B1=E0=C2=EB=B5=C4=B7=B6=CE=A7

-------
Explicit is better than implicit ...=20

-----Original Message-----
From: Anthony Liu [mailto:antonyliu2002 at yahoo.com]=20
Sent: 2004=C4=EA3=D4=C212=C8=D5 2:44
To: python-chinese at lists.python.cn
Subject: RE: [python-chinese] Any easy way to check if a string =
containsatleast one Chinese character?


Hi, Jacob,

The encoding is gbk. Any idea?

--- Jacob Fan <jacob at exoweb.net> wrote:
> It depends on which encoding the file use ...
>=20
> -------
> Explicit is better than implicit ...
>=20
> -----Original Message-----
> From: Anthony Liu [mailto:antonyliu2002 at yahoo.com]
> Sent: 2004年3月11日 19:01
> To: pycn
> Subject: [python-chinese] Any easy way to check if a
> string contains atleast one Chinese character?
>=20
>=20
> My python code will keep reading strings from a disk
> file.
>=20
> I wanna check if each string I read contains at
> least
> one Chinese character.
>=20
> Any easy way like theString.hasChinese()?=20
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn=20
> http://python.cn/mailman/listinfo/python-chinese


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you=92re looking for faster =
http://search.yahoo.com


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

2011年07月08日 星期五 11:40

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

    你的回复:

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

    Zeuux © 2024

    京ICP备05028076号