Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'cpython': 0.05; 'encoding': 0.05; 'subject:Python': 0.06; 'assuming': 0.09; 'dan': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; "(i'm": 0.16; 'imdb': 0.16; 'quite.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'uncommon': 0.16; 'wrote:': 0.18; 'addition,': 0.20; 'appears': 0.22; 'header:User-Agent:1': 0.23; 'received:comcast.net': 0.24; 'question': 0.24; 'nearly': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'received:24': 0.27; 'correct': 0.29; 'am,': 0.29; 'subject:) ': 0.29; 'characters': 0.30; 'dec': 0.30; 'apparently': 0.31; 'file': 0.32; 'probably': 0.32; 'text': 0.33; 'subject: (': 0.35; 'but': 0.35; 'thanks': 0.36; 'subject:?': 0.36; 'to:addr :python-list': 0.38; 'fact': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'flat': 0.60; 'tell': 0.60; 'reads': 0.68; 'issues;': 0.84; 'subject:Movie': 0.84; '2013,': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Movie (MPAA) ratings and Python? Date: Wed, 11 Dec 2013 13:35:17 -0500 References: <2CDEC558-B896-402C-8F70-A3089A5EC93D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: c-24-61-184-15.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386786929 news.xs4all.nl 2880 [2001:888:2000:d::a6]:43344 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61605 On 12/10/13 6:50 PM, Dan Stromberg wrote: > > On Tue, Dec 10, 2013 at 1:07 PM, Petite Abeille > > wrote: > > > On Dec 10, 2013, at 6:25 AM, Dan Stromberg > wrote: > > > The IMDB flat text file probably came the closest, but it appears > to have encoding issues; it's apparently nearly windows-1255, but > not quite. > > It's ISO-8859-1. > > Thanks - that reads well from CPython 3.3. > > 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. -- Ned Batchelder, http://nedbatchelder.com