Re: problems with  character

2005-03-23 Thread John Machin
On Tue, 22 Mar 2005 21:39:30 -, "Claudio Grondi" <[EMAIL PROTECTED]> wrote: >In my ASCII table 'Â' is '\xC2' You've got an *ASCII* table that includes that?? I hope you paid for it in Confederate dollars or czarist roubles -- that's about what such a table would be worth. -- http://mail

Re: problems with  character

2005-03-23 Thread jdonnell
Thanks everyone, I got it working earlier this morning using deelan's suggestion. I modified the code in his link so that it removes rather than replaces the characters. Also, this was my first experience with unicode and what confused me is that I was thinking of a unicode object as an encoding,

Re: Re: problems with  character

2005-03-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, jdonnell wrote: > Thanks for all the replies. I just got in to work so I haven't tried > any of them yet. I see that I wasn't as clear as I should have been so > I'll clarify a little. I'm grabbing some data from msn's rss feed. > Here's an example. > http://search.msn.com/

Re: problems with  character

2005-03-23 Thread jdonnell
Thanks for all the replies. I just got in to work so I haven't tried any of them yet. I see that I wasn't as clear as I should have been so I'll clarify a little. I'm grabbing some data from msn's rss feed. Here's an example. http://search.msn.com/results.aspx?q=domain+name&format=rss&FORM=ZZRE Th

Re: Re: problems with  character

2005-03-22 Thread Bengt Richter
On Tue, 22 Mar 2005 20:09:55 -0600, "John Roth" <[EMAIL PROTECTED]> wrote: >I had this problem recently. It turned out that something >had encoded a unicode string into utf-8. When I found >the culprit and fixed the underlying design issue, it went away. > >John Roth > > > >"jdonnell" <[EMAIL PROT

Re: problems with  character

2005-03-22 Thread John Roth
I had this problem recently. It turned out that something had encoded a unicode string into utf-8. When I found the culprit and fixed the underlying design issue, it went away. John Roth "jdonnell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have a mysql database with characters

Re: problems with  character

2005-03-22 Thread Marc 'BlackJack' Rintsch
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 th

Re: problems with  character

2005-03-22 Thread Do Re Mi chel La Si Do
And this run OK for me : s = 'a  aaa' print s print s.replace('Â', '') -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with  character

2005-03-22 Thread Do Re Mi chel La Si Do
a  aaa' 0123456 It's OK -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with  character

2005-03-22 Thread Claudio Grondi
"Claudio Grondi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > >>s = 'a  aaa' > >>What am I doing wrong? > > First get rid of characters not allowed > in Python code. > Replace  with appropriate escape > sequence: /x## where ## is the (should be \x##) > hexadecimal cod

Re: problems with  character

2005-03-22 Thread Claudio Grondi
>>s = 'a  aaa' >>What am I doing wrong? First get rid of characters not allowed in Python code. Replace  with appropriate escape sequence: /x## where ## is the hexadecimal code of the ASCII character. Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with  character

2005-03-22 Thread deelan
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. use the "hammer" recipe. i'm using it to create URL-friendly fragment from latin-1 album titles:

problems with  character

2005-03-22 Thread jdonnell
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. These strings are coming out as type 'str' not 'unicode' so I tried to just record[4].replace('Â', '') but this does nothing. However the followin