Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense] Date: Fri, 27 May 2016 12:09:00 -0400 Lines: 22 Message-ID: References: <5743a8d2$0$1587$c3e8da3$5496439d@news.astraweb.com> <7D6476C4-9969-4648-AB43-4CE0C7115B9C@icloud.com> <57457c4f$0$11122$c3e8da3@news.astraweb.com> <57461326.5040606@lucidity.plus.com> <5746AFA3.9020303@lucidity.plus.com> <8737p589bo.fsf@elektro.pacujo.net> <57475CB5.7010102@lucidity.plus.com> <87pos8y14e.fsf@elektro.pacujo.net> <5747c071$0$1593$c3e8da3$5496439d@news.astraweb.com> <87fut4xc8w.fsf@elektro.pacujo.net> <5747ed83$0$1620$c3e8da3$5496439d@news.astraweb.com> <8760u0x9qu.fsf@elektro.pacujo.net> <574819d8$0$1598$c3e8da3$5496439d@news.astraweb.com> <1464357085.645851.620574537.560EAC9E@webmail.messagingengine.com> <1464365340.674161.620708793.4CE81D69@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de Mc71F9nLMQWYXZSGuuVZkQbCgaoRsTDhkqsNfDkvXQpQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'character,': 0.07; 'subject:code': 0.07; 'utf-8': 0.07; 'cached': 0.09; 'received:internal': 0.09; 'subject:while': 0.09; 'python': 0.10; 'subject: \n ': 0.15; 'example)': 0.16; 'invisible': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'objections': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.44': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:compute4.internal': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'utf-8)': 0.16; 'wrote:': 0.16; 'string': 0.17; 'byte': 0.18; 'bytes': 0.18; '>>>': 0.20; 'ascii': 0.22; "python's": 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'skip:" 20': 0.26; 'coding': 0.27; 'fri,': 0.27; 'order.': 0.27; 'equally': 0.29; 'subject: [': 0.29; 'character': 0.29; '(including': 0.30; 'guess': 0.31; 'fixed': 0.31; 'another': 0.32; 'but': 0.36; '(and': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'two': 0.37; 'received:66': 0.38; 'version': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.61; 'per': 0.62; 'matter': 0.63; 'subject: / ': 0.63; 'more': 0.63; 'times': 0.63; 'costs': 0.67; 'treat': 0.72; 'euro': 0.75; 'dollar': 0.76; 'aiui': 0.84; 'are...': 0.84; 'not)': 0.84; 'subject:else': 0.84; 'subject:sense': 0.84; 'political': 0.97 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=JlFM2GzSRnrPrrn+e+OpyeknQxo=; b=Sa7ykX 6x7PrpSXferWJzDliIAATNF19EcN0GLSCGmTMDcECWYkVJKgz3VudqqovpwMWpT/ cA+QMfdC+BJi8ENUn6wrkBHnHkKXb71s4RZm0Bu6YEF/ECweujIRK0h86TWTnEzP mFIG3ViuMw64zwDhOus/XhYzMWZPfETmTjmtI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=JlFM2GzSRnrPrrn +e+OpyeknQxo=; b=W0JLFJ8Bi1RGmwf7PurT7WcBiKUxOpxUwHQ0RTWdyni+Zji /+yD0BnHQlcTjy5hvcTf+zM6tuYn9JQ2pbPxQ5fr9mTpi/UrTf8yPAQzG7A8OukP 55dY5juU6HxL9kcFGh4shu4uuBXwSf8pWI813cO/5rZG1+H7UlNBuxZIOBxw= X-Sasl-Enc: PUaNlLoViG20HvnyH5uuWgPOTj6UCQYJZXG8zoB2tc3P 1464365340 X-Mailer: MessagingEngine.com Webmail Interface - ajax-b882aaad In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1464365340.674161.620708793.4CE81D69@webmail.messagingengine.com> X-Mailman-Original-References: <5743a8d2$0$1587$c3e8da3$5496439d@news.astraweb.com> <7D6476C4-9969-4648-AB43-4CE0C7115B9C@icloud.com> <57457c4f$0$11122$c3e8da3@news.astraweb.com> <57461326.5040606@lucidity.plus.com> <5746AFA3.9020303@lucidity.plus.com> <8737p589bo.fsf@elektro.pacujo.net> <57475CB5.7010102@lucidity.plus.com> <87pos8y14e.fsf@elektro.pacujo.net> <5747c071$0$1593$c3e8da3$5496439d@news.astraweb.com> <87fut4xc8w.fsf@elektro.pacujo.net> <5747ed83$0$1620$c3e8da3$5496439d@news.astraweb.com> <8760u0x9qu.fsf@elektro.pacujo.net> <574819d8$0$1598$c3e8da3$5496439d@news.astraweb.com> <1464357085.645851.620574537.560EAC9E@webmail.messagingengine.com> Xref: csiph.com comp.lang.python:109177 On Fri, May 27, 2016, at 11:53, Rustom Mody wrote: > And coding systems are VERY political. > Sure what characters are put in (and not) is political > But more invisible but equally political is the collating order. >=20 > eg No one understands what jmf's gripes are... My guess is that a Euro > costs 3 times a Dollar. >=20 > >>> "=E2=82=AC".encode("UTF-8") > b'\xe2\x82\xac' > >>> "$".encode("UTF-8") > b'$' >=20 > [Its another matter that this is not the evil deed of python but of > UTF-8!] AIUI jmf's issue is that python's string type (nothing to do with UTF-8) doesn't treat all strings equally. Strings that are only in Latin-1 (including your dollar example) have only one byte per character, whereas strings with BMP characters have two bytes per character (he also has some more difficult to understand objections to the large fixed overhead and the cached UTF-8 version [which ASCII strings don't have])