Re: Elegent solution to replacing ' and ?

2006-05-06 Thread fyleow
I'm using PyGreSQL on a PostgreSQL db. I didn't even include my SQL but Serge guessed right and that's what I had. I changed it and it works now. Thanks for the help! :) -- http://mail.python.org/mailman/listinfo/python-list

Elegent solution to replacing ' and ?

2006-05-05 Thread fyleow
I'm trying to replace the ' and characters in the strings I get from feedparser so I can enter it in the database without getting errors. Here's what I have right now. self.title = entry.title.encode('utf-8') self.title = self.title.replace('\', '\\\') self.title = self.title.replace('\'',

Re: Elegent solution to replacing ' and ?

2006-05-05 Thread Jim
Are you sure that your dB interface module doesn't do this for you? What dB and interface are you using? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Elegent solution to replacing ' and ?

2006-05-05 Thread Serge Orlov
fyleow wrote: I'm trying to replace the ' and characters in the strings I get from feedparser so I can enter it in the database without getting errors. Here's what I have right now. self.title = entry.title.encode('utf-8') self.title = self.title.replace('\', '\\\') self.title =