Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.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; 'encoding': 0.05; 'subject:Python': 0.06; 'binary': 0.07; 'defaults': 0.07; 'encoded': 0.07; 'failing': 0.07; 'removes': 0.07; 'exception,': 0.09; 'false.': 0.09; 'throws': 0.09; 'python': 0.11; 'windows': 0.15; 'character.': 0.16; 'compliant,': 0.16; 'compression': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'surprises': 0.16; 'throw': 0.16; 'using,': 0.16; 'zeros': 0.16; 'wrote:': 0.18; 'command': 0.22; 'header:User-Agent:1': 0.23; 'unicode': 0.24; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'am,': 0.29; 'character': 0.29; 'characters': 0.30; 'exceptions': 0.31; 'running': 0.33; 'convert': 0.35; 'being': 0.38; 'message- id:@gmail.com': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'such': 0.63; 'prompt': 0.68; 'absolutely': 0.87 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Mon, 14 Jul 2014 21:47:32 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python 3 is killing Python References: <57ajo9poljjre4c4ig0n0ss8kph8k78lp0@4ax.com> <5389cb53$0$29978$c3e8da3$5496439d@news.astraweb.com> <99b7b2a2-7521-42d7-a5a0-1a35d4d5b922@googlegroups.com> In-Reply-To: <99b7b2a2-7521-42d7-a5a0-1a35d4d5b922@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1405397542 news.xs4all.nl 2863 [2001:888:2000:d::a6]:44715 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74462 On 05/31/2014 09:48 AM, jmf wrote: > Absolutely FALSE. Python 3.3 and up can handle any and all unicode characters you want to throw at it, without surprises such as what you get in javascript. Python 3 uses UTF-4 encoding under the hood, with a compression optimization that removes leading zeros from binary representation of each character. Windows command consoles are not unicode compliant, and so running python programs a command prompt console will often lead to exceptions because Python must convert unicode to the character set that the console is using, and when a character is hit that cannot be encoded Python defaults to being correct and throws an exception, instead of failing silently.