Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'encoding': 0.05; '(of': 0.07; '21,': 0.07; 'incompatible': 0.07; 'lesser': 0.07; 'ascii': 0.09; 'bits': 0.09; 'encode': 0.09; 'handful': 0.09; 'subject:2.7': 0.09; 'used.': 0.09; 'cc:addr:python-list': 0.11; '8-bit': 0.16; '80s': 0.16; '90s,': 0.16; 'alphabet': 0.16; 'encodings': 0.16; 'encodings,': 0.16; 'fits': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happily': 0.16; 'letters.': 0.16; 'sheer': 0.16; 'subject:unicode': 0.16; 'sure.': 0.16; 'unicode,': 0.16; 'subject:python': 0.16; 'all.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'basically': 0.19; 'possible,': 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'byte': 0.24; 'instance,': 0.24; 'of.': 0.24; 'unicode': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'possibly': 0.26; 'supported': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'character': 0.29; 'wonder': 0.29; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'probably': 0.32; 'languages': 0.32; 'stuff': 0.32; 'quite': 0.32; 'text': 0.33; 'fri,': 0.33; 'subject:time': 0.33; 'could': 0.34; 'subject: (': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:one': 0.36; 'possible': 0.36; 'half': 0.37; 'two': 0.37; 'easily': 0.37; 'nov': 0.38; 'pm,': 0.38; 'how': 0.40; 'skip:u 10': 0.60; 'letters': 0.60; 'most': 0.60; 'back': 0.62; 'high': 0.63; 'skip:n 10': 0.64; 'subject:more': 0.64; 'different': 0.65; 'due': 0.66; '20,': 0.68; 'combining': 0.68; 'published': 0.71; 'eight': 0.74; '2014,': 0.84; 'bmp,': 0.84; 'packing': 0.84; 'russian,': 0.84; 'notion': 0.91; 'suspicious': 0.91; 'this;': 0.91; 'whereas': 0.91; 'to:none': 0.92; 'numerous': 0.93; 'remember,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=xwJM6QRB/HSjh5+0a+B4ierUT7rr2PCpNFotVrods5g=; b=ZYZpdXxyZCY3zJt27X1eF2pO2uVXxMtx/r1GcVLVKdaRT6Aet3PbVBfJ77KD/KrYYh FP/3ikUv/daWgC958DXCpLnv91i/jXoIMZvPwSc9fwqUHV1o4+M5ltu666POUqsxqOZ/ fOAe3vjU2KfCV+sQhAyNU8aNVzSt5D2Qru6CjotdwG+2LUIRMzhhU7+BBFy3xOBr/43O f0W6YDysC/Pm4zrYGw4FNdAr/OPM07CM0Dke0QP9tCKb6R7sZcnR7y7KkbKWZETVfFWk ZBj9q5W3Rjw6sfyamy4NFlbMvJp9JUvgas2n6zCm7LgIpx8dUzNLOYFj70qVRBMP95mY 3zbA== MIME-Version: 1.0 X-Received: by 10.50.178.212 with SMTP id da20mr1203147igc.34.1416533961913; Thu, 20 Nov 2014 17:39:21 -0800 (PST) In-Reply-To: <1416533490.1620457.193598605.2BEB550F@webmail.messagingengine.com> References: <1416491999.209592.193345213.3A6FF9A4@webmail.messagingengine.com> <87ppch8zvx.fsf@elektro.pacujo.net> <546e880d$0$12995$c3e8da3$5496439d@news.astraweb.com> <1416533490.1620457.193598605.2BEB550F@webmail.messagingengine.com> Date: Fri, 21 Nov 2014 12:39:21 +1100 Subject: Re: python 2.7 and unicode (one more time) From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416533965 news.xs4all.nl 2856 [2001:888:2000:d::a6]:34122 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81158 On Fri, Nov 21, 2014 at 12:31 PM, wrote: > On Thu, Nov 20, 2014, at 20:10, Chris Angelico wrote: >> 2) Languages which use a different alphabet (eg Cyrillic - Russian, >> Bulgarian). You could possibly cram them into an eight-bit encoding >> without tipping ASCII out, but I'm not sure. In Unicode, these >> languages are all easily supported by the BMP, as they don't use a >> huge number of characters each. > > There are numerous eight-bit encodings that support latin and one other > alphabet. Remember, ASCII is a seven-bit encoding, and an eight-bit > encoding is basically two seven-bit encodings. I'm aware of this; Greek, for instance, fits quite happily into ISO-8859-7, which is eight-bit. > The most difficult (of those still possible at all) language to encode > in eight bits is actually Vietnamese, which uses the Latin alphabet, due > to the sheer number of accented letters used. Windows' encoding of it > (along with some other lesser used encodings, all for Vietnamese) is the > only 8-bit encoding to use combining accents, in a way unfortunately > incompatible with unicode normalization if naively translated, whereas > VISCII sacrifices a handful of C0 control characters in addition to > fully packing the high half with letters. This is what I was suspicious of. The very notion of "combining accents" already breaks the notion that "a byte is a character is a glyph", which most eight-bit encodings try to pretend. In any case, the BMP still easily copes with them all. (Hmm. I wonder how you'd typeset the old "Self-Pronouncing Alphabet" for English? It's basically English text with a few markings added to letters - not standard diacriticals that already exist in Unicode, but dots. Probably possible, one way or another... but I haven't seen SPA text since the 90s, and that was in stuff published back in the 80s or so.) ChrisA