Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'encoding': 0.05; 'utf-8': 0.07; 'pep': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic': 0.16; 'url:peps': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'bytes': 0.24; 'url:dev': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; '[1]': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'python2.7': 0.31; 'url:python': 0.33; 'received:google.com': 0.35; 'url:org': 0.36; 'should': 0.36; 'though,': 0.39; 'skip:p 20': 0.39; 'according': 0.40; 'become': 0.64; '26,': 0.68; 'default': 0.69; 'subject:this': 0.83; '2.5.': 0.84; '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; bh=I99AXmeCAsyi/LSTuZCPld36WC1Y8MuoHWp8sFZWAoI=; b=XCigdmVBxdGFHthunwEnLmoL45GLWlfR1W+KAmDhdzDaj82Cjz5EncWOs4KU+tKCbL mU2+4y2JZWtxHi78b3MIXLhShF3I0FQGQHFuH+tEg74CjHDzo9RE9FCyez34jq+Az8a0 TeDfYro2PoX9RIWd8QJOqiVXOTa62+M/6DeFRuldYSL+xADcOLBz+owx+okHvSpxe/iS 3Ihcu6oKtNsNRh9HQY2L0mPVoj46R/OMiN9GrfIcF9VamNXF9Eb30Zt6stOYIIxd1Gjn rZ44cDSv2CmQuG9FC+y8r7UjiaPuBP/pwVakol9qmPwp2eu3aODrfOB6jldfeoJflLsX /plA== MIME-Version: 1.0 X-Received: by 10.68.172.196 with SMTP id be4mr21331774pbc.12.1390677229753; Sat, 25 Jan 2014 11:13:49 -0800 (PST) In-Reply-To: References: <52e33f8d$0$29999$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 26 Jan 2014 06:13:49 +1100 Subject: Re: Trying to understand this moji-bake 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390677240 news.xs4all.nl 2902 [2001:888:2000:d::a6]:47249 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64750 On Sun, Jan 26, 2014 at 4:56 AM, Peter Pearson wrote: > $ python2.7 -c "import sys; print(sys.stdin.encoding)" > UTF-8 This isn't from stdin, though, it's about the interpretation of the bytes of source code without a magic cookie. According to PEP 263 [1], the default encoding should have become "ascii" as of Python 2.5. That's what puzzles me. ChrisA [1] http://www.python.org/dev/peps/pep-0263/