Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:code': 0.07; 'message-id:@glegroupsg2000goo.googlegroups.com': 0.09; 'reply- to:addr:comp.lang.python': 0.09; 'subject:characters': 0.09; 'to:addr:comp.lang.python': 0.09; 'url:peps': 0.09; 'from:addr:miki.tebeka': 0.16; 'from:name:miki tebeka': 0.16; 'subject:non': 0.16; 'url:pep-0263': 0.16; 'cc:addr:python-list': 0.16; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.22; 'header:In- Reply-To:1': 0.22; '(see': 0.28; 'url:)': 0.29; 'cc:addr:python.org': 0.30; 'unicode,': 0.30; 'url:dev': 0.30; 'subject:?': 0.31; 'there': 0.33; 'header:User-Agent:1': 0.34; 'subject:How': 0.35; 'file': 0.36; 'url:python': 0.36; 'several': 0.37; 'received:google.com': 0.38; 'url:org': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'subject:from': 0.40; 'your': 0.61; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.71; 'reply-to:addr:googlegroups.com': 0.74; 'subject:removal': 0.84 Newsgroups: comp.lang.python Date: Mon, 12 Sep 2011 06:23:09 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.84.253.172; posting-account=uo-8fwoAAACKsFzFX78JHudx1V7WDXZ0 References: User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: How do I automate the removal of all non-ascii characters from my code? From: Miki Tebeka To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: comp.lang.python@googlegroups.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 3 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315833791 news.xs4all.nl 2541 [2001:888:2000:d::a6]:45290 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:13177 You can add "# coding=UTF8" to the top of your file (see http://www.python.org/dev/peps/pep-0263/). Of you want to remove unicode, there are several options, one of them is passing the file through "iconv --to ascii".