Re: Euro Sign raise UnicodeEncodeError

2007-01-26 Thread Michael Radziej
Hi, we have a bit of chaos here ... Tickets 3370, 1356 and probably 952 all are about this problem, all are accepted, and #3370 and #1356 have very similar patches. I ask everybody to continue discussion in django-developers ("unicode issues in multiple tickets"), and I ask the authors of these t

Re: Euro Sign raise UnicodeEncodeError

2007-01-26 Thread ak
Guys, take a look here: http://code.djangoproject.com/ticket/3370 it seems to be the solution, but needs to be tested in all environments --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Euro Sign raise UnicodeEncodeError

2007-01-26 Thread Ivan Sagalaev
Christian Schmidt wrote: > Do I have to encode (or decode) the string before I put it into the > database First, it depends on database backend. As far as I know MySQL wants byte strings (and for example psycopg2 lives happily with unicode strings). If you use newforms then you have data in uni

Re: Euro Sign raise UnicodeEncodeError

2007-01-25 Thread oggie rob
Essentially ak pointed out the error. It is expecting 8bit encoding and the euro is apparently higher than 8 bits (i.e. 20AC is greater than FF). Just keep plugging around (particularly from the shell & looking at the db) and you'll probably find it. -rob On Jan 25, 10:12 pm, "Christian Schmidt

Re: Euro Sign raise UnicodeEncodeError

2007-01-25 Thread Christian Schmidt
On 26 Jan., 06:37, "ak" <[EMAIL PROTECTED]> wrote: > Same thing with national characters ... > DEFAULT_CHARSET = 'utf-8' This doesn't solve the problem. The errormessage still appears with the same traceback. Any other ideas? --~--~-~--~~~---~--~~ You received th

Re: Euro Sign raise UnicodeEncodeError

2007-01-25 Thread ak
Same thing with national characters ... DEFAULT_CHARSET = 'utf-8' I think this is a bug somewhere in newforms On 25 Янв., 23:10, "Christian Schmidt" <[EMAIL PROTECTED]> wrote: > Hi, > > I've got a problem with putting non unicode signs into a mysql table. > > I get an UnicodeEncodeError when an

Euro Sign raise UnicodeEncodeError

2007-01-25 Thread Christian Schmidt
Hi, I've got a problem with putting non unicode signs into a mysql table. I get an UnicodeEncodeError when an user puts the Euro Sign (€) in a newform Textfield. The Exception raises when when Django want to write into the MySQL Database. Do I have to encode (or decode) the string before I put