How do I automate the removal of all non-ascii characters from my code?
jmfauth
wxjmfauth at gmail.com
Tue Sep 13 03:49:17 EDT 2011
On 12 sep, 23:39, "Rhodri James" <rho... at wildebst.demon.co.uk> wrote:
> Now read what Steven wrote again. The issue is that the program contains
> characters that are syntactically illegal. The "engine" can be perfectly
> correctly translating a character as a smart quote or a non breaking space
> or an e-umlaut or whatever, but that doesn't make the character legal!
>
Yes, you are right. I did not understand in that way.
However, a small correction/precision. Illegal character
do not exit. One can "only" have an ill-formed encoded code
points or an illegal encoded code point representing a
character/glyph.
Basically, in the present case. The issue is most probably
a mismatch between the coding directive and the real
coding, with "no coding directive" == 'ascii'.
jmf
More information about the Python-list
mailing list