Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'subject: -- ': 0.07; 'string': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tests,': 0.09; 'url:unicode': 0.09; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Unicode': 0.16; 'subject:handling': 0.16; 'wrote:': 0.18; 'first.': 0.19; 'examples': 0.20; 'tests': 0.22; 'header:User-Agent:1': 0.23; 'passes': 0.24; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; 'agreed.': 0.31; 'correctly.': 0.31; "d'aprano": 0.31; 'post.': 0.31; 'steven': 0.31; "can't": 0.35; 'one,': 0.35; 'operate': 0.35; 'there': 0.35; 'sequence': 0.36; 'doing': 0.36; 'charset:us- ascii': 0.36; 'thanks': 0.36; "i'll": 0.36; 'url:org': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'failures': 0.60; 'here:': 0.62; "you'll": 0.62; 'believe': 0.68; 'lose': 0.68; 'ethan': 0.84; 'furman': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Neil Cerutti Subject: Re: Python Unicode handling wins again -- mostly Date: Tue, 3 Dec 2013 13:47:42 +0000 (UTC) Organization: Norwich University References: <529934dc$0$29993$c3e8da3$5496439d@news.astraweb.com> <529CEFB1.2030007@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: jackman.norwich.edu User-Agent: slrn/0.9.9p1/mm/ao (Win32) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386078553 news.xs4all.nl 2916 [2001:888:2000:d::a6]:41821 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60934 On 2013-12-02, Ethan Furman wrote: > On 11/29/2013 04:44 PM, Steven D'Aprano wrote: >> Out of the nine tests, Python 3.3 passes six, with three tests >> being failures or dubious. If you believe that the native >> string type should operate on code-points, then you'll think >> that Python does the right thing. > > I think Python is doing it correctly. If I want to operate on > "clusters" I'll normalize the string first. Normalizing doesn't resolve the issues the blog brings up; NFC can't condense every multi-code-point sequence into one, and normalizing can lose or mangle information. There are good examples here: http://unicode.org/reports/tr15/ > Thanks for this excellent post. Agreed. -- Neil Cerutti