Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.06; 'subject: -- ': 0.07; 'len(x)': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '1:08': 0.16; 'character.': 0.16; 'equivalents': 0.16; 'expect,': 0.16; 'lowercase': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'subject:Unicode': 0.16; 'subject:handling': 0.16; 'unicode.': 0.16; 'uppercase': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'unicode': 0.24; 'equivalent': 0.26; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'that.': 0.31; 'cases': 0.33; 'fri,': 0.33; 'but': 0.35; 'there': 0.35; 'false': 0.36; 'nov': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'expect': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:x 10': 0.40; 'skip:u 10': 0.60; '30,': 0.65; 'smith': 0.68; 'article': 0.77; 'received:myvzw.com': 0.84; 'don\xe2\x80\x99t': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: Python Unicode handling wins again -- mostly Date: Fri, 29 Nov 2013 22:06:21 -0500 References: <529934dc$0$29993$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 151.sub-70-208-162.myvzw.com In-Reply-To: User-Agent: Groundhog Newsreader for Android 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385780739 news.xs4all.nl 15922 [2001:888:2000:d::a6]:35918 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60793 On Fri, 29 Nov 2013 21:28:47 -0500, Roy Smith wrote: > In article , > Chris Angelico wrote: > > On Sat, Nov 30, 2013 at 1:08 PM, Roy Smith wrote: > > > I would certainly expect, x.lower() == x.upper().lower(), to be True for > > > all values of x over the set of valid unicode codepoints. Having > > > u"\uFB04".upper() ==> "FFL" breaks that. I would also expect len(x) == > > > len(x.upper()) to be True. > > That's a nice theory, but the Unicode consortium disagrees with you on > > both points. And they were already false long before Unicode. I don’t know specifics but there are many cases where there are no uppercase equivalents for a particular lowercase character. And others where the uppercase equivalent takes multiple characters. -- DaveA