Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'sufficient': 0.05; 'subject:Python': 0.06; 'subject: -- ': 0.07; 'bits': 0.09; 'encode': 0.09; 'ancillary': 0.16; 'frees': 0.16; 'surrogate': 0.16; 'wrote:': 0.18; 'accommodate': 0.24; 'unicode': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'fixing': 0.31; 'subject:skip:i 10': 0.31; 'another': 0.32; 'received:google.com': 0.35; 'scheme': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'total': 0.65; 'benefit': 0.68; 'grow': 0.77; 'packing': 0.84; 'understand,': 0.84 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:to :content-type; bh=QkuABdbnw9Pyb+2dzUHlSLx3Q7+fyjYPBEN6374I4p8=; b=lH/dzr6wajEw4wyA8PpSb2XSpPilACQkmaMhNwrXAgct7dxbEtm/ycb7qDA/8B2No+ foycW7i5TYpKmVGA+23+7vHn1zTyf80he/hNGwBbx0Kpa6LGedK3NbOcc0WvysprPjbT vbmdtaNF4/NUCoudkd5ysDgVeKEhiY1W8d2lnNN4exoFC0MOjgjx4AogMdlCoIdjBBO1 JrQ0n2SUKzYmwN6WhMHNzoj3Zov5e5nvJbaO4nw+uNyEshI+ozy1qpvH0fBSMBXop2tt oH/mpzvM4vWhIi+2gS/RQ4AlQHvKG3+NlaP8cO7/b4LPV4M5NXc7ZzTMpeNzPnlNxtfd EEBg== MIME-Version: 1.0 X-Received: by 10.236.124.237 with SMTP id x73mr22002528yhh.137.1401861308819; Tue, 03 Jun 2014 22:55:08 -0700 (PDT) In-Reply-To: <538eac94$0$11109$c3e8da3@news.astraweb.com> References: <20140603194949.3147497d@x34f> <44acd692-5dcd-4e5f-8238-7fbe0de4db2a@googlegroups.com> <538eac94$0$11109$c3e8da3@news.astraweb.com> Date: Tue, 3 Jun 2014 23:55:08 -0600 Subject: Re: Micro Python -- a lean and efficient implementation of Python 3 From: Ian Kelly To: Python Content-Type: multipart/alternative; boundary=20cf303a332b56301204fafc45fa 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401861637 news.xs4all.nl 2968 [2001:888:2000:d::a6]:39588 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72599 --20cf303a332b56301204fafc45fa Content-Type: text/plain; charset=UTF-8 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. Another benefit of fixing the size is that it frees the other 11 bits per character of UTF-32 for packing in ancillary data. --20cf303a332b56301204fafc45fa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Jun 3, 2014 11:27 PM, "Steven D'Aprano" <steve@pearwood.info> 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 U= nicode were allowed to grow any larger than that, UTF-16 would no longer be= able to encode all codepoints.

Another benefit of fixing the size is that it frees the othe= r 11 bits per character of UTF-32 for packing in ancillary data.

--20cf303a332b56301204fafc45fa--