Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'python.': 0.02; '"""': 0.05; 'python': 0.09; 'url:unicode': 0.09; 'files.': 0.13; 'sat,': 0.15; '"should"': 0.16; 'cp1252': 0.16; 'entries,': 0.16; 'infinity': 0.16; 'url:ftp': 0.16; 'wrote:': 0.17; 'byte': 0.17; 'unicode': 0.17; 'examples': 0.18; 'appropriate': 0.20; 'meant': 0.21; 'noted': 0.22; 'tables': 0.23; 'header:In-Reply-To:1': 0.25; 'fit': 0.26; 'am,': 0.27; 'order.': 0.27; 'pages,': 0.27; 'converting': 0.27; 'entries': 0.27; 'message-id:@mail.gmail.com': 0.27; 'link,': 0.29; 'scheme.': 0.29; 'character': 0.29; 'received:209.85.215.46': 0.30; 'at:': 0.31; 'code': 0.31; '(and': 0.32; 'not.': 0.32; 'web,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'exist': 0.35; 'mapping': 0.35; 'nov': 0.35; 'especially': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'url:org': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'first': 0.61; 'here:': 0.62; 'letters': 0.62; 'url:public': 0.62; 'more': 0.63; 'behavior': 0.64; 'sound': 0.65; 'published': 0.71; '"best': 0.84; 'counterparts': 0.84; 'to:name:python': 0.84; 'wish.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=mJNnY8AOO4dijKOIadltOarh9oaa0yY0iw5JZaYwCEc=; b=ZmQktJPgW6TA7mu12vZ8XF7B2YhGsAiRAsBCdkMYQt1T1kSmjICXD814yYtt3Dgrgj avv+c5hYPSP9IwI8DDxHe19IFJQY+i/DspvOwxjoXfg41q+h6R2E8PAIL6oo7vOoBvdc OY/gsJ+MAFRoVIyEzcfiJ0fxjkzhZMY+IbnwXzEN/oaH6g/Q+QBxMaKQ9iqZgjVwU3sU Jo7HYbrPqeX2g8rFNczLmKc7kXdJqq05uQWyaV+ikogd4sqtrf86xFMtfPKBvn6Bnj// gOnEAcAxor7ME79Xo5JRQGnsUWdu5Hq0uXCdvvfgtMKZGxIu37cT9UhW7DVoO28VGK5U r59w== MIME-Version: 1.0 In-Reply-To: References: <32ab6e2e-e1b1-41ea-8ef4-6e4f763065bf@googlegroups.com> From: Ian Kelly Date: Sat, 17 Nov 2012 11:13:51 -0700 Subject: Re: latin1 and cp1252 inconsistent? To: Python Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353176064 news.xs4all.nl 6896 [2001:888:2000:d::a6]:36313 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33477 On Sat, Nov 17, 2012 at 11:08 AM, Ian Kelly wrote: > On Sat, Nov 17, 2012 at 9:56 AM, wrote: >> "should" is a wish. The reality is that documents (and especially URLs) = exist that can be decoded with latin1, but will backtrace with cp1252. I se= e this as a sign that a small refactorization of cp1252 is in order. The pr= oposal is to change those "UNDEFINED" entries to "" entries, as is= done here: >> >> http://dvcs.w3.org/hg/encoding/raw-file/tip/index-windows-1252.txt >> >> and here: >> >> ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/best= fit1252.txt > > The README for the "BestFit" document states: > > """ > These tables include "best fit" behavior which is not present in the > other files. Examples of best fit > are converting fullwidth letters to their counterparts when converting > to single byte code pages, and > mapping the Infinity character to the number 8. > """ > > This does not sound like appropriate behavior for a generalized > conversion scheme. It is also noted that the "BestFit" document is > not authoritative at: > > http://www.iana.org/assignments/charset-reg/windows-1252 I meant to also comment on the first link, but forgot. As that document is published by the W3C, I understand it to be specific to the Web, which Python is not. Hence I think the more general Unicode specification is more appropriate for Python.