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?

Date 2011-09-12 17:49 +1000
Subject How do I automate the removal of all non-ascii characters from my code?
From Alec Taylor <alec.taylor6@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1016.1315813775.27778.python-list@python.org> (permalink)

Show all headers | 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