[Python-ml-jp 1813] unicode
Tokio Kikuchi
tkikuchi @ is.kochi-u.ac.jp
2002年 9月 18日 (水) 15:27:41 JST
菊地@単なる情報です。
japanese codecs は他のと違うのかな?ってので、一部
転送します。他のcodecは u'' でなくてもいいのか。
-------- Original Message --------
Subject: [Mailman-checkins] mailman/Mailman Utils.py,2.37,2.38
Date: Tue, 17 Sep 2002 22:38:53 -0700
From: bwarsaw @ users.sourceforge.net
To: mailman-checkins @ python.org
Update of /cvsroot/mailman/mailman/Mailman
In directory usw-pr-cvs1:/tmp/cvs-serv345/Mailman
Modified Files:
Utils.py
Log Message:
canonstr(): With help from Tokio Kikuchi, this patch should make for
better Japanese support. If we're converting to &#XYZ; form, use
chr() if the integer is < 256 otherwise use unichr(). If the
resulting joined string is already a Unicode, don't convert it.
uncanonstr(): Use u'' instead of '' as the string when s is None. The
Japanese codecs require a Unicode string as its argument, not an 8-bit
string.
--
菊地時夫 tkikuchi@ is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/
〒780-8520 高知大学理学部情報科学教室
Python-ml-jp メーリングリストの案内