Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.048 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.01; 'subject:Python': 0.06; 'assuming': 0.09; 'dan': 0.09; 'cc:addr:python-list': 0.11; "(i'm": 0.16; 'cc:name:python list': 0.16; 'guessing': 0.16; 'uncommon': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'addition,': 0.20; 'cc:addr:python.org': 0.22; 'question': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'am,': 0.29; 'subject:) ': 0.29; 'characters': 0.30; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'probably': 0.32; 'text': 0.33; 'guess': 0.33; 'subject: (': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'fact': 0.38; 'pm,': 0.38; 'games,': 0.60; 'most': 0.60; 'tell': 0.60; 'hope': 0.61; 'batchelder': 0.84; 'rating.': 0.84; 'subject:Movie': 0.84; 'confidence': 0.95; '2013': 0.98 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 :cc:content-type; bh=rlMQwpnckpc9ZGya67osDR7wo4fEfrcieIi1l3CzVyI=; b=yM+ttCzObWQl0t67owwy9KjcshPaGYRHJVKhl5G/1mNht9iA89ZS8aeZq2YWj1hK0R 8tTh08DVaIDKk2O1YI1DEBxACr6hPXZI0+/nHM90t3JyrY67CmrWZ907fOHu9A/4MS68 K7jQtn3Ltn8T55zgZko9A3325IZWrUdc7q23H54Q84xd2oulN8fanRr+vRtvosEn1Jx5 1RnLB3TCC4wPTT32hmgAD8q7vKef103ZDd0uhWEH7l+WDnV9N/DyExUlS2hT1KziUpxi nVTn94x9gN3lgeCK37an2ojizrduWMnvQ8+eDWiijldWjo2KHQ60cYMm6LDdxacGnp48 j24g== MIME-Version: 1.0 X-Received: by 10.195.18.34 with SMTP id gj2mr3906290wjd.82.1386803255180; Wed, 11 Dec 2013 15:07:35 -0800 (PST) In-Reply-To: References: <2CDEC558-B896-402C-8F70-A3089A5EC93D@gmail.com> Date: Wed, 11 Dec 2013 15:07:35 -0800 Subject: Re: Movie (MPAA) ratings and Python? From: Dan Stromberg To: Ned Batchelder Content-Type: multipart/alternative; boundary=001a11c28aca66030204ed4a4b00 Cc: Python List 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: 53 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386803257 news.xs4all.nl 2852 [2001:888:2000:d::a6]:59124 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61622 --001a11c28aca66030204ed4a4b00 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Dec 11, 2013 at 10:35 AM, Ned Batchelder wrote: > On 12/10/13 6:50 PM, Dan Stromberg wrote: > Now the question becomes: Why did chardet tell me it was windows-1255? :) > > It probably told you it was Windows-1252 (I'm assuming the last 5 is a > typo). > > Windows-1252 is a super-set of ISO-8859-1, so any text that is correct > ISO-8859-1 is also correct Windows-1252. In addition, it's not uncommon to > find text marked as ISO-8859-1 that in fact has characters that make it > Windows-1252. > $ chardet mpaa-ratings-reasons.list mpaa-ratings-reasons.list: windows-1255 (confidence: 0.97) I'm aware that chardet is playing guessing games, though one would hope it would guess well most of the time, and give a reasonable confidence rating. --001a11c28aca66030204ed4a4b00 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

= On Wed, Dec 11, 2013 at 10:35 AM, Ned Batchelder <ned@nedbatchelder.co= m> wrote:
On 12/1= 0/13 6:50 PM, Dan Stromberg wrote:
Now the question becomes: Why did chardet tell me it was windows-1255? =A0:= )

It probably told you it was Windows-1252 (I'm assuming the last 5 is a = typo).

Windows-1252 is a super-set of ISO-8859-1, so any text that is correct ISO-= 8859-1 is also correct Windows-1252. =A0In addition, it's not uncommon = to find text marked as ISO-8859-1 that in fact has characters that make it = Windows-1252.

=A0$ chardet mpaa-ratings-reasons.list<= br>mpaa-ratings-reasons.list: windows-1255 (confidence: 0.97)

=
I'm aware that chardet is playing guessing games, though one would= hope it would guess well most of the time, and give a reasonable confidenc= e rating.

--001a11c28aca66030204ed4a4b00--