Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!novso.com!news.skynet.be!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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'correct.': 0.07; 'python': 0.09; '(it': 0.09; 'subject:()': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; "skip:' 30": 0.15; '*always*': 0.16; 'sharp': 0.16; 'subject:3.3': 0.16; 'subject:unicode': 0.16; 'unicode.': 0.16; 'uppercase': 0.16; '8bit%:3': 0.17; 'specifies': 0.17; 'unicode': 0.17; '>>>': 0.18; '(or': 0.18; 'this:': 0.23; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; '(see': 0.27; 'cc:addr:gmail.com': 0.27; 'question': 0.27; "doesn't": 0.28; 'correct': 0.28; '>>>>': 0.29; 'really,': 0.29; 'case,': 0.29; "i'm": 0.29; "skip:' 10": 0.30; 'that.': 0.30; 'implement': 0.32; 'problem.': 0.32; '-----': 0.32; 'says': 0.33; 'form.': 0.33; 'received:google.com': 0.34; 'christian': 0.34; 'acceptable': 0.35; 'false': 0.35; 'mapping': 0.35; 'doing': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'cc:no real name:2**1': 0.36; 'should': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'think': 0.40; 'from:no real name:2**0': 0.60; 'real': 0.61; 'subject:, ': 0.61; 'information': 0.63; 'more': 0.63; 'subject.': 0.65; 'url:u': 0.66; 'wish': 0.70; 'discover': 0.72; 'upper': 0.75; '"das': 0.84; 'grosse': 0.84; 'latin': 0.84; 'why?': 0.84 Newsgroups: comp.lang.python Date: Wed, 19 Dec 2012 12:55:08 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=178.198.163.217; posting-account=ung4FAoAAAC46zhHJ0Nsnuox7M5gDvs_ References: <2adb4a25-8ea3-441f-b8c0-ee6c87e4b19f@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 178.198.163.217 MIME-Version: 1.0 Subject: Re: Py 3.3, unicode / upper() From: wxjmfauth@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org, wxjmfauth@gmail.com 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: , Message-ID: Lines: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355950517 news.xs4all.nl 6970 [2001:888:2000:d::a6]:32949 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35156 Le mercredi 19 d=E9cembre 2012 15:52:23 UTC+1, Christian Heimes a =E9crit= =A0: > Am 19.12.2012 15:23, schrieb wxjmfauth@gmail.com: >=20 > > But, this is not the problem. >=20 > > I was suprised to discover this: >=20 > >=20 >=20 > >>>> 'Stra=DFe'.upper() >=20 > > 'STRASSE' >=20 > >=20 >=20 > > I really, really do not know what I should think about that. >=20 > > (It is a complex subject.) And the real question is why? >=20 >=20 >=20 > It's correct. LATIN SMALL LETTER SHARP S doesn't have an upper case >=20 > form. However the unicode database specifies an upper case mapping from >=20 > =DF to SS. http://codepoints.net/U+00DF >=20 >=20 >=20 > Christian ----- Yes, it is correct (or can be considered as correct). I do not wish to discuss the typographical problematic of "Das Grosse Eszett". The web is full of pages on the subject. However, I never succeeded to find an "official position" from Unicode. The best information I found seem to indicate (to converge), U+1E9E is now the "supported" uppercase form of U+00DF. (see DIN). What is bothering me, is more the implementation. The Unicode documentation says roughly this: if something can not be honoured, there is no harm, but do not implement a workaroud. In that case, I'm not sure Python is doing the best. If "wrong", this can be considered as programmatically correct or logically acceptable (Py3.2) >>> 'Stra=DFe'.upper().lower().capitalize() =3D=3D 'Stra=DFe' True while this will *always* be problematic (Py3.3) >>> 'Stra=DFe'.upper().lower().capitalize() =3D=3D 'Stra=DFe' False jmf