problems with  character

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Tue Mar 22 19:32:35 EST 2005


In <1111521139.657563.55410 at o13g2000cwo.googlegroups.com>, 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




More information about the Python-list mailing list