Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.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.034 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'python': 0.07; 'attribute.': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'benjamin': 0.16; 'received:203.24': 0.16; 'subject:unicode': 0.16; 'header:In- Reply-To:1': 0.22; 'thu,': 0.22; 'specify': 0.25; "doesn't": 0.28; 'perhaps': 0.32; 'to:addr:python-list': 0.32; 'file': 0.35; 'header:User-Agent:1': 0.35; 'to:addr:python.org': 0.39; '2011': 0.62; 'reply-to:no real name:2**0': 0.72; 'header:Reply-To:1': 0.72; 'encoding,': 0.84 In-Reply-To: References: <4dcb50f8$0$29973$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 12 May 2011 14:41:47 +1000 Subject: Re: unicode by default From: "John Machin" To: python-list@python.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: sjmachin@lexicon.net 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: 9 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305175310 news.xs4all.nl 41113 [::ffff:82.94.164.166]:39171 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5197 On Thu, May 12, 2011 2:14 pm, Benjamin Kaplan wrote: > > If the file you're writing to doesn't specify an encoding, Python will > default to locale.getdefaultencoding(), No such attribute. Perhaps you mean locale.getpreferredencoding()