Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.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.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'python': 0.08; '>>>>': 0.09; 'linux.': 0.09; 'subject:string': 0.09; 'am,': 0.12; 'py3': 0.16; 'str()': 0.16; 'subject:Unicode': 0.16; 'cc:addr:python- list': 0.16; 'wrote:': 0.18; 'say,': 0.19; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'implicit': 0.23; 'literal': 0.23; 'string': 0.24; 'cc:2**0': 0.26; 'testing': 0.26; 'there.': 0.27; 'bit': 0.28; 'explicit': 0.29; 'worked': 0.29; 'print': 0.29; 'cc:addr:python.org': 0.29; "it'd": 0.30; 'unicode,': 0.30; 'source': 0.32; 'does': 0.32; 'header:User-Agent:1': 0.33; 'it.': 0.33; 'to?': 0.34; 'here,': 0.35; 'something': 0.35; 'things': 0.35; 'received:192': 0.38; 'right,': 0.39; 'unless': 0.39; 'might': 0.40; 'your': 0.61; 'subject': 0.61; 'amazing': 0.68; 'header:Reply-To:1': 0.70; 'euro': 0.70; 'reply-to:no real name:2**0': 0.72; '08:45': 0.84; 'encoding,': 0.84 Date: Wed, 29 Feb 2012 09:54:05 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19 MIME-Version: 1.0 To: jmfauth Subject: Re: On u'Unicode string literals' (Py3) References: <92580c23-775d-4b10-9986-1b1abb1f673f@d17g2000vba.googlegroups.com> In-Reply-To: <92580c23-775d-4b10-9986-1b1abb1f673f@d17g2000vba.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:rdu0uuFYCIZf5h/xPZfoHKAU5k11linhXKqnX41tINP 2hsbQeY7i24doLpVVKepC/lVj/Bx0xtsRxC3OH8GvINHziGCE6 w7pCcRdn32CL+peIJ6bFSihsPQ2klJTDSt0K1agfKCk1lAz7NY Y0n0/IUnCarZALIkTqHhnffOq1IuwztqKaCKE6UYiDgKeqLR16 0P6d23lge7LHY4PGRqYHTA6StZDq/cJmxxPGBMaa/evQEPEPFC dmyu9qZn0MKH086F7T177YpgLk6Xw3VRfN7++JBFXOpArZVYln 6iU5ThQi4e0eeDbVs6Wq8F1Ob3Ec8vD47XPoaypT+kcg2SgDTf dIAB1Oiz7jLHT0DI8RcA= Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: d@davea.name 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330527259 news.xs4all.nl 6906 [2001:888:2000:d::a6]:33123 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:21043 Just who are you replying to? On 02/29/2012 08:45 AM, jmfauth wrote: > For those who do not know: > The u'' string literal trick has never worked in Python 2. > No trick there. If you have something explicit to say, then say it. >>>> sys.version > '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' Why then does the subject line say Py3 ? >>>> print u'Un oeuf à zéro EURO uro' You're testing three things here, so there's no telling which might be wrong. Your source encoding, the implicit str() conversion for unicode, and the particular terminal you're printing it on. It'd be amazing if all three were right, unless you're on Linux. > Un uf à zéro uro > jmf -- DaveA