Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #13159

How do I automate the removal of all non-ascii characters from my code?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.wiretrip.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <alec.taylor6@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'automate': 0.05; 'subject:code': 0.07; "(it's": 0.09; 'received:209.85.160.174': 0.09; 'received:mail-gy0-f174.google.com': 0.09; 'subject:characters': 0.09; 'suggestions,': 0.09; 'url:peps': 0.09; 'error:': 0.12; 'code?': 0.16; 'declared;': 0.16; 'from:addr:alec.taylor6': 0.16; 'from:name:alec taylor': 0.16; 'odt': 0.16; 'subject:non': 0.16; 'syntaxerror:': 0.16; 'url:pep-0263': 0.16; 'converted': 0.18; 'convert': 0.19; "i'm": 0.27; 'message-id:@mail.gmail.com': 0.29; 'writer': 0.30; 'thanks': 0.30; 'subject:?': 0.31; 'yet': 0.32; "can't": 0.33; 'to:addr:python-list': 0.33; 'character': 0.34; 'received:209.85.160': 0.35; 'subject:How': 0.35; 'post': 0.36; 'file': 0.36; 'url:python': 0.36; 'using': 0.37; 'but': 0.37; 'some': 0.38; 'received:google.com': 0.38; 'url:org': 0.38; 'received:209.85': 0.38; 'characters': 0.39; 'to:addr:python.org': 0.39; 'subject:from': 0.40; 'removal': 0.64; 'taylor': 0.67; 'paper': 0.72; 'evening,': 0.84; 'subject:removal': 0.84; 'writer,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=HLIdh/4q3viY8ZNWPCZw33oYYTyrXpcUlW2QwxjY4Hw=; b=bgYvOFCy6TURxaa0aUsQ3VstxXyqczrieB1/A18cHTMFr+IrHkXcdOUQEujMetExvM Ug6fqWlGrl9WTEShXoMT4lsVTzLeS3xs4t7ycaO5m+HtDKtEMvCnX2p9pwcB2bsV+ojh VyD9yvKDkxNJrXGIciD6wxFm7rIHbK38TpmXU=
MIME-Version 1.0
Date Mon, 12 Sep 2011 17:49:31 +1000
Subject How do I automate the removal of all non-ascii characters from my code?
From Alec Taylor <alec.taylor6@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1016.1315813775.27778.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1315813775 news.xs4all.nl 2405 [2001:888:2000:d::a6]:38137
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:13159

Show key headers only | View raw


Good evening,

I have converted ODT to HTML using LibreOffice Writer, because I want
to convert from HTML to Creole using python-creole. Unfortunately I
get this error: "File "Convert to Creole.py", line 17
SyntaxError: Non-ASCII character '\xe2' in file Convert to Creole.py
on line 18, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details".

Unfortunately I can't post my document yet (it's a research paper I'm
working on), but I'm sure you'll get the same result if you write up a
document in LibreOffice Writer and add some End Notes.

How do I automate the removal of all non-ascii characters from my code?

Thanks for all suggestions,

Alec Taylor

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

How do I automate the removal of all non-ascii characters from my code? Alec Taylor <alec.taylor6@gmail.com> - 2011-09-12 17:49 +1000
  Re: How do I automate the removal of all non-ascii characters from my code? Miki Tebeka <miki.tebeka@gmail.com> - 2011-09-12 06:23 -0700
  Re: How do I automate the removal of all non-ascii characters from my code? Miki Tebeka <miki.tebeka@gmail.com> - 2011-09-12 06:23 -0700

csiph-web