Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'encoding': 0.05; 'output': 0.05; 'subject:Python': 0.06; 'matches': 0.07; 'correct,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'windows': 0.15; '"from': 0.16; "'a',": 0.16; "'e']": 0.16; "'r',": 0.16; '__future__': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'bit': 0.19; '>>>': 0.22; 'import': 0.22; 'otherwise,': 0.22; 'cc:addr:python.org': 0.22; 'char': 0.24; 'mon,': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '13,': 0.31; 'assert': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'not.': 0.33; 'received:google.com': 0.35; "he's": 0.36; 'pm,': 0.38; 'skip:u 10': 0.60; 'happen': 0.63; 'subjectcharset:utf-8': 0.72; 'presumably': 0.84; '2013,': 0.91; 'to:none': 0.92 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:content-transfer-encoding; bh=TwPp4NSvCu5ajVIUNjburww136AzAoU8h5t9919kMDo=; b=Q06R+84nZQ+4F+yanqPsBgmhQeSLPmMdX4QMJU3BqbafYRKOHZgVHhC+pd9/QMfBYB VcfTzYoKebVjKWre9HU5ofPc8INF1/DrOb53qjt9igNXPNKhMbINZEtQrZ7UVsDhUMXh cJyBro2oL9iWR+XIKt6l+hIZwU0XHtXZRWcqywxCjY643SEjtvWq9zv6kpEKo40YfX2t MiRsjmtJrv2nyf5jDQdYusMCvXxT8Vk3BvDUbayNFcQnoh0/X8sepiqGS0nXijMmSP1d AsWeYaBu6f/3O/29MX7cVjIYioQcENJmdRqVNszDiWi6vrhhSJdjYYsG1Z746QbMEfXW Omaw== MIME-Version: 1.0 X-Received: by 10.68.108.194 with SMTP id hm2mr29106404pbb.22.1389610648075; Mon, 13 Jan 2014 02:57:28 -0800 (PST) In-Reply-To: <52d3c20b$0$29970$c3e8da3$5496439d@news.astraweb.com> References: <30dfa6f1-61b2-49b8-bc65-5fd18d498c38@googlegroups.com> <52d3c20b$0$29970$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 13 Jan 2014 21:57:28 +1100 Subject: =?UTF-8?B?UmU6ICdTdHJhw59lJyAoJ1N0cmFzc2UnKSBhbmQgUHl0aG9uIDI=?= From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389610651 news.xs4all.nl 2851 [2001:888:2000:d::a6]:44062 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63824 On Mon, Jan 13, 2014 at 9:38 PM, Steven D'Aprano wrote: > I think you are using "from __future__ import unicode_literals". > Otherwise, that cannot happen in Python 2.x. > Alas, not true. >>> sys.version '2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]' >>> sys.maxunicode 65535 >>> assert 'Stra=C3=9Fe'[4] =3D=3D '=C3=9F' >>> list('Stra=C3=9Fe') ['S', 't', 'r', 'a', '\xdf', 'e'] That's Windows XP. Presumably Latin-1 (or CP-1252, they both have that char at 0xDF). He happens to be correct, *as long as the source code encoding matches the output encoding and is one that uses 0xDF to mean U+00DF*. Otherwise, he's not. ChrisA