Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed0.kamp.net!newsfeed.kamp.net!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.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.021 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.01; 'encoding': 0.05; 'subject:text': 0.05; 'laura': 0.07; 'utf-8': 0.07; 'subject:question': 0.10; 'cc:addr:python-list': 0.11; 'received:openend.se': 0.16; 'received:theraft.openend.se': 0.16; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'header :In-Reply-To:1': 0.27; 'writes:': 0.31; 'cc:no real name:2**1': 0.33; 'charset:us-ascii': 0.36; 'does': 0.39; 'dave': 0.60; "you'll": 0.62; 'header:Message-Id:1': 0.63; '2015': 0.84; 'received:89': 0.85; 'angel': 0.91 To: Dave Angel From: Laura Creighton Subject: Re: Newbie question about text encoding In-Reply-To: Message from Dave Angel of "Tue, 24 Feb 2015 06:25:24 -0500." <54EC5FA4.6070703@davea.name> References: <54EC5FA4.6070703@davea.name> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16450.1424789741.1@fido> Date: Tue, 24 Feb 2015 15:55:41 +0100 Cc: python-list@python.org, lac@openend.se 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424789760 news.xs4all.nl 2857 [2001:888:2000:d::a6]:52240 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 2539 X-Received-Body-CRC: 1851850206 Xref: csiph.com comp.lang.python:86320 In a message of Tue, 24 Feb 2015 06:25:24 -0500, Dave Angel writes: >But utf-8 does not seem to be the right encoding for that bytestring. >So you'll need a form like: > mystring = rec.decode(encoding='xxx') > >for some value of xxx. >DaveA And the xxx you want is "latin1" Laura