Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'sufficient': 0.05; 'subject:Python': 0.06; 'subject: -- ': 0.07; 'utf-8': 0.07; 'encode': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.12; '(easier': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject: \n ': 0.16; 'surrogate': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'accommodate': 0.24; 'bytes': 0.24; 'char': 0.24; 'unicode': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'code': 0.31; 'subject:skip:i 10': 0.31; 'scheme': 0.36; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'that,': 0.38; 'received:71': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'ian': 0.60; 'total': 0.65; 'believe': 0.68; 'grow': 0.77; 'received:fios.verizon.net': 0.84; 'understand,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Micro Python -- a lean and efficient implementation of Python 3 Date: Wed, 04 Jun 2014 03:00:05 -0400 References: <20140603194949.3147497d@x34f> <44acd692-5dcd-4e5f-8238-7fbe0de4db2a@googlegroups.com> <538eac94$0$11109$c3e8da3@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-71-175-90-87.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401865221 news.xs4all.nl 2834 [2001:888:2000:d::a6]:54035 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72604 On 6/4/2014 1:55 AM, Ian Kelly wrote: > > On Jun 3, 2014 11:27 PM, "Steven D'Aprano" > wrote: > > For technical reasons which I don't fully understand, Unicode only > > uses 21 of those 32 bits, giving a total of 1114112 available code > > points. > > I think mainly it's to accommodate UTF-16. The surrogate pair scheme is > sufficient to encode up to 16 supplementary planes, so if Unicode were > allowed to grow any larger than that, UTF-16 would no longer be able to > encode all codepoints. I believe the original utf-8 used up to 6 bytes per char to encode 2**32 potential chars. Just 4 bytes limits to 2**21 and for whatever reason (easier decoding?), utf-8 was revised down (unusual ;-). -- Terry Jan Reedy