Bugs item #1327233, was opened at 2005-10-15 09:08 Message generated for change (Comment added) made by perky You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1327233&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Python Interpreter Core Group: Python 2.4 >Status: Closed >Resolution: Invalid Priority: 1 Submitted By: Humberto Diógenes (virtualspirit) Assigned to: Nobody/Anonymous (nobody) Summary: title() uppercases latin1 strings after accented letters Initial Comment: When using latin1, the title() method of strings considers accented letters as word separators. The same thing doesn't happen with unicode strings: >>> print u'diógenes'.title() Diógenes >>> print 'diógenes'.title() DióGenes I'm using Python 2.4.2 on Ubuntu Breezy with 'utf-8' as default encoding. ---------------------------------------------------------------------- >Comment By: Hye-Shik Chang (perky) Date: 2005-10-15 11:55 Message: Logged In: YES user_id=55188 String methods are locale-dependent. You should set locale LC_CTYPE) to use such methods. >>> print 'diógenes'.title() DióGenes >>> import locale >>> locale.setlocale(locale.LC_ALL, '') 'fr_FR.ISO8859-1' >>> print 'diógenes'.title() Diógenes And, string manipulation methods only works for single byte character encodings. So the usage will not work for UTF-8 or others. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1327233&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com