Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'mrab': 0.05; 'represents': 0.05; '21,': 0.07; 'encoded': 0.07; 'utf-8': 0.07; 'string': 0.09; 'ascii': 0.09; 'bytes,': 0.09; 'differently.': 0.09; 'subject:few': 0.09; 'subset': 0.09; 'python': 0.11; '16-bit': 0.16; 'doing,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guilty': 0.16; 'wrote:': 0.18; '(not': 0.18; 'seems': 0.21; '>>>': 0.22; 'coding': 0.22; 'previously': 0.22; '2.2': 0.24; 'byte': 0.24; 'unicode': 0.24; 'options': 0.25; 'equivalent': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'points': 0.29; 'characters': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'schemes': 0.31; 'fri,': 0.33; 'implemented': 0.33; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'two': 0.37; 'handle': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'units': 0.60; 'more': 0.64; 'beloved': 0.84; 'common,': 0.84; 'points,': 0.84; '2013': 0.98 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=I5+JPgpnAG367yRo6ag7/bXYQ+JCJ13bwdmGBJaQjo8=; b=qwWUH4INRPdvcuWfz7V9vDOm4yH0guxzCxWJeWNtCQQQYAQiK1kJ25JzG66VugsvFY fa/xAd61RDw9wl2ViLFHQXrGSJszJe9BtO1q6iLzBorJ1qLi59Is4HoccKhO6miDrKNt 8CgYVTODDoDWuRQ+Aw9V4SRwBlce78EVzg/LRzwBBFyRSgaBHIyy6ZnlQKLKp3DkQCg/ ruGMdANd5Jln+AUW86O/rXTh/WxffQQ4DyW0dcLGJkYdr3c8TbE0aqfI8LNkDZWsVFaL SKNk29AS5tg+7hNsiLFCfWYWTjo9ys9v5c8vmVbsuBSWMWvIIOPfhG+fSrxxV2uB0urA T8kg== MIME-Version: 1.0 X-Received: by 10.59.9.69 with SMTP id dq5mr3525358ved.87.1371748899665; Thu, 20 Jun 2013 10:21:39 -0700 (PDT) In-Reply-To: <51C33918.6060102@mrabarnett.plus.com> References: <6dfa3707-80f4-407a-a109-66dbb0130513@googlegroups.com> <51b83e5a$0$29998$c3e8da3$5496439d@news.astraweb.com> <51b90ead$0$29997$c3e8da3$5496439d@news.astraweb.com> <51b9708b$0$29872$c3e8da3$5496439d@news.astraweb.com> <77ba6b16-4b1d-47a6-9b9b-5af45335c4fe@googlegroups.com> <51c2a089$0$29973$c3e8da3$5496439d@news.astraweb.com> <114200cf-2d46-46cb-bb5f-7c5f8ab98a66@googlegroups.com> <51C33918.6060102@mrabarnett.plus.com> Date: Fri, 21 Jun 2013 03:21:39 +1000 Subject: Re: A few questiosn about encoding From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371748902 news.xs4all.nl 15948 [2001:888:2000:d::a6]:52561 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48813 On Fri, Jun 21, 2013 at 3:17 AM, MRAB wrote: > On 20/06/2013 17:37, Chris Angelico wrote: >> >> On Fri, Jun 21, 2013 at 2:27 AM, wrote: >>> >>> And all these coding schemes have something in common, >>> they work all with a unique set of code points, more >>> precisely a unique set of encoded code points (not >>> the set of implemented code points (byte)). >>> >>> Just what the flexible string representation is not >>> doing, it artificially devides unicode in subsets and try >>> to handle eache subset differently. >>> >> >> >> UTF-16 divides Unicode into two subsets: BMP characters (encoded using >> one 16-bit unit) and astral characters (encoded using two 16-bit units >> in the D800::/5 netblock, or equivalent thereof). Your beloved narrow >> builds are guilty of exactly the same crime as the hated 3.3. >> > UTF-8 divides Unicode into subsets which are encoded in 1, 2, 3, or 4 > bytes, and those who previously used ASCII still need only 1 byte per > codepoint! Yes, but there's never (AFAIK) been a Python implementation that represents strings in UTF-8; UTF-16 was one of two options for Python 2.2 through 3.2, and is the one that jmf always seems to be measuring against. ChrisA