Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'compression': 0.09; 'fails.': 0.09; 'likely.': 0.09; 'subject:string': 0.09; 'aug': 0.13; 'files.': 0.13; 'ebcdic,': 0.16; 'efficiently.': 0.16; 'encodings': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:unicode': 0.16; 'worst': 0.16; 'wed,': 0.16; 'string': 0.17; 'wrote:': 0.17; 'code.': 0.20; 'received:209.85.214.174': 0.21; 'stick': 0.22; 'header:In-Reply- To:1': 0.25; 'coding': 0.27; 'raw': 0.27; 'message- id:@mail.gmail.com': 0.27; 'rest': 0.28; 'efficiently': 0.29; 'equivalent.': 0.29; 'represented': 0.29; 'case,': 0.29; 'code': 0.31; 'point': 0.31; 'handle': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'depends': 0.36; 'unable': 0.36; 'possible': 0.37; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'behind': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'range': 0.60; 'subject:, ': 0.61; 'different': 0.63; 'subject:...': 0.63; 'everything,': 0.84; 'subject:, ...': 0.84; 'affairs': 0.93 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:to :content-type; bh=7GGy06VfwSNxU+GEbB32aQprW/Grp9Gd1V5zKoIWsnI=; b=sb51/6uRIZZjtW3p+ryCKfeNKyBBdJS7m+kxzVn1wrbAIjEgBh6G2oe5wwn09gk//t BKq3RuyVBiPf8O14JibFrQcygJtU+pw8IMCMDJ9vlDJsnFcqcQSRGdiog5QPC4ExQoea b9drOFsT62Xm6+h3C9nK9ulfOHkSgI0cNgiQncPMes07ogNOeUShyLOhhmJ7p8coosT+ oCBqyY0bJBmoOow9gwMrQoGbHIKKfgU+7UW8+jwfFAglERJZL/2S7G4y8siuxon1fBlR bjyBL2daGmGpgGkoKC8ZwV73j7k7aqLZYFSYcUmFWvNIJuWJtdMAwHjHqWF2ICy9H47J fJtg== MIME-Version: 1.0 In-Reply-To: <62566024-df1d-4948-a27a-45c7820ddc6c@googlegroups.com> References: <1cb3f062-eb45-4b0c-977b-76afb099923c@googlegroups.com> <503a0d51$0$6574$c3e8da3$5496439d@news.astraweb.com> <503a8361$0$6574$c3e8da3$5496439d@news.astraweb.com> <2e92da71-fbd2-467f-9088-1c79fa7bcf69@googlegroups.com> <62566024-df1d-4948-a27a-45c7820ddc6c@googlegroups.com> Date: Wed, 29 Aug 2012 22:34:36 +1000 Subject: Re: Flexible string representation, unicode, typography, ... 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.12 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346243680 news.xs4all.nl 6978 [2001:888:2000:d::a6]:55503 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28060 On Wed, Aug 29, 2012 at 9:40 PM, wrote: > For a given coding scheme, all code points/characters are > equivalent. Expecting to handle a sub-range in a coding > scheme without shaking that coding scheme is impossible. Not all codepoints are equally likely. That's the whole point behind variable-length encodings like Huffman compression (eg deflation as used in zip/gzip), UTF-8, quoted-printable, and Morse code. They handle a sub-range efficiently and the rest of the range less efficiently. > If a coding scheme does not give satisfaction, the only > valid solution is to create a new coding scheme, cp1252, > mac-roman, EBCDIC, ... or the interesting "TeX" case, where > the "internal" coding depends on the fonts! http://xkcd.com/927/ > This "Flexible String Representation" fails. Not only > it is unable to stick with a coding scheme, it is > a mixing of coding schemes, the worst of all possible > implementations. I propose, then, that we abolish files. Who *knows* how many different things might be represented in a file! We need a single coding scheme that can handle everything, without changing representation. This ridiculous state of affairs must not go on; the same representation can be used for bitmapped images or raw audio data! ChrisA