In <[EMAIL PROTECTED]>, jdonnell wrote:
> I have a mysql database with characters like à à àin it. I'm
> trying to write a python script to remove these, but I'm having a
> really hard time.
>
> [...]
>
> The other odd thing is that the à character shows up as two spaces if
> I print it to the terminal from mysql, but it shows up as à when I
> print from the simple script above.
> What am I doing wrong?
Is it possible that your DB stores strings UTF-8 encoded? The
byte sequence '\xc2\xa0' which displays as 'Ã ' in latin-1 encoding is a
non breakable space character.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list