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


Groups > comp.lang.python > #13177

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

Newsgroups comp.lang.python
Date 2011-09-12 06:23 -0700
References <mailman.1016.1315813775.27778.python-list@python.org>
Subject Re: How do I automate the removal of all non-ascii characters from my code?
From Miki Tebeka <miki.tebeka@gmail.com>
Message-ID <mailman.1032.1315833791.27778.python-list@python.org> (permalink)

Show all headers | View raw


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".

Back to comp.lang.python | Previous | NextPrevious in thread | Next 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