Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'languages,': 0.04; 'subject:Python': 0.06; 'column': 0.07; 'php.': 0.07; 'postgresql': 0.07; 'utf-8': 0.07; '*never*': 0.16; 'arbitrarily': 0.16; 'codec': 0.16; 'encodings,': 0.16; 'etc?': 0.16; 'excluded': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'permissive': 0.16; 'roy': 0.16; 'thinking,': 0.16; ':-)': 0.16; 'wrote:': 0.18; '(but': 0.19; 'mon,': 0.24; 'versions': 0.24; 'developers': 0.25; 'least': 0.26; 'subject:/': 0.26; 'supported': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'character': 0.29; "doesn't": 0.30; 'newer': 0.30; 'message- id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'go.': 0.31; 'so- called': 0.31; 'steven': 0.31; 'stuff': 0.32; "we're": 0.32; 'limitation': 0.33; 'could': 0.34; 'problem': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'url:org': 0.36; 'should': 0.36; 'too': 0.37; 'received:209': 0.37; 'being': 0.38; 'represent': 0.38; 'version,': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'real': 0.63; 'maximum': 0.63; 'within': 0.65; 'worth': 0.66; 'brain': 0.68; 'smith': 0.68; '50%': 0.78; 'collation': 0.84; 'etc),': 0.84; 'subject:long': 0.84; 'cutting': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=E42GJuKyEMTplbpeO1HKADZ0jIdLKLXtZfu0Fzgt868=; b=Dd88CsR1LXRKxdexF5/d8wExJQPJY1rJBHRIOt9DOit6IJqiPCZUptdlcbASmg5LMh xpd02FzW1xs7P4WTh7UdzEMSA1AbM0GnlZahnUwdsusMGfgR9P8DPZt9UAvMnKI06Tan 9qtxPdhddsCdZoqGEML8ek7W116tf8jInhvxGHnn0Ucp7ZX1AK9VYMmUmYfPe0Xrwnid 96kj/R2I6n5SDBVvJBXjZ4YBIUUlw+FAPugQArpytAbcxYojv6RCmdCBE4tX1bWFJjgB L4Z3tfRswGmkPlH+99kwbF2Y2e5uFjRuRk/Sqbk5Q5FoPOVk6GIvRumT/cjMlmxigeH+ /RYQ== MIME-Version: 1.0 X-Received: by 10.52.16.211 with SMTP id i19mr8502764vdd.91.1364836830378; Mon, 01 Apr 2013 10:20:30 -0700 (PDT) In-Reply-To: <5159beb6$0$29967$c3e8da3$5496439d@news.astraweb.com> References: <5153a12d$0$29998$c3e8da3$5496439d@news.astraweb.com> <5153d313$0$29984$c3e8da3$5496439d@news.astraweb.com> <0b6be19c-ff11-4e24-a7dc-fec0af411393@kw7g2000pbb.googlegroups.com> <5153f5ce$0$29984$c3e8da3$5496439d@news.astraweb.com> <11ef1d36-0783-4cb2-b29f-9ae573ed7e47@googlegroups.com> <6a146aba-a032-4aac-b2d3-7acedcebd804@q3g2000pbv.googlegroups.com> <515941d8$0$29967$c3e8da3$5496439d@news.astraweb.com> <5159beb6$0$29967$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 2 Apr 2013 04:20:30 +1100 Subject: Re: Performance of int/long in Python 3 From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364836833 news.xs4all.nl 6964 [2001:888:2000:d::a6]:58691 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42472 On Tue, Apr 2, 2013 at 4:07 AM, Steven D'Aprano wrote: > On Mon, 01 Apr 2013 08:15:53 -0400, Roy Smith wrote: >> It turns out, the problem is that the version of MySQL we're using > > Well there you go. Why don't you use a real database? > > http://www.postgresql.org/docs/9.2/static/multibyte.html > > :-) > > Postgresql has supported non-broken UTF-8 since at least version 8.1. Not only that, but I *rely* on PostgreSQL to test-or-reject stuff that comes from untrustworthy languages, like PHP. If it's malformed in any way, it won't get past the database. >> doesn't support non-BMP characters. Newer versions do (but you have to >> declare the column to use the utf8bm4 character set). I could upgrade >> to a newer MySQL version, but it's just not worth it. > > My brain just broke. So-called "UTF-8" in MySQL only includes up to a > maximum of three-byte characters. There has *never* been a time where > UTF-8 excluded four-byte characters. What were the developers thinking, > arbitrarily cutting out support for 50% of UTF-8? Steven, you punctuated that wrongly. What, were the developers *thinking*? Arbitrarily etc? It really is brain-breaking. I could understand a naive UTF-8 codec being too permissive (allowing over-long encodings, allowing codepoints above what's allocated (eg FA 80 80 80 80, which would notionally represent U+2000000), etc), but why should it arbitrarily stop short? There must have been some internal limitation - that, perhaps, collation was defined only within the BMP. ChrisA