::-- ZoomQuiet [2005-03-31 07:39:55]

Unicode in Python

Unicode 字串

Unicode Strings in Python

标准库的Unicode 支持

Unicode Support in the Python Standard Library

Unicode编码的文件

Unicode files and Python

输出Unicode字串

print and Unicode strings

Unicode和正则表达式

Python-cn 列表中讨论得来 {{{发件人: cpunion <[email protected]> 回复: [email protected] 收件人: [email protected] 日期: 2005-5-27 上午10:09 主题: Re: [python-chinese] 关于python正则表达式 的一个问题 }}}

   1 a = unicode ("""随着信息技术的发展,计算机应用渗透到社会生活的各个领域,特
   2 别是在电子商务中的应用,使人们对信息的依赖程度越来越大,从而使信息安全技
   3 术显得格外重要。信息安全技术主要是研究计算机系统信息的机密性、完整性、可
   4 获取性和真实性,它的核心是加密技术。加密技术根据加密密钥与解密密钥是否相
   5 同可分为对称加密技术(单密钥加密技术)和非对称加密技术(公开密钥加密技
   6 术)。加个叹号!加个问号?试试句号加引号。“试试叹号加引号!”。“试试问号
   7 加引号?” 加点废话"""
   8     , "utf-8")
   9 expression = unicode ("。|!|?|。”|!”|?", "utf-8")
  10 import re
  11 listSentence = re.split (expression, a)
  12 for i in listSentence:
  13    print i

UnicodeInPython (last edited 2009-12-25 07:13:53 by localhost)