Re: forcing UTF8 data inside django

2006-12-12 Thread Victor Ng
Unfortunately, not all charsets will support all unicode characters, so really, the fact that DEFAULT_CHARSET configurable is mostly a moot point for me. For example, latin1 won't let me encode asian characters. I honestly can't think of a good reason to do anything other than UTF8 unless you've

Re: forcing UTF8 data inside django

2006-12-12 Thread favo
I think you'd better enforce de/encoding to settings.DEFAULT_CHARSET in the middleware. not hardcode utf8. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: forcing UTF8 data inside django

2006-12-11 Thread Victor Ng
Hi Anton, I don't have mysql5 to test with right now, but I have tested my stuff against sqlite and it seems to work there, so I can't imagine that this will cause you problems on mysql. My usecase is probably like yours - I need multilingual support since I have to handle names of countries and

Re: forcing UTF8 data inside django

2006-12-11 Thread Victor Ng
Hi Gabor, First off, I just realized that the code I posted earlier has a small bug. Line 17 should've read: 17 for key, vallist in cgiargs.lists(): the old code used 'items()' which only pulls a single value out of multivaluedict. On to unicode The reason I'm paranoid ab

Re: forcing UTF8 data inside django

2006-12-11 Thread Gábor Farkas
Victor Ng wrote: > Hi all, > > The unicode problem seems to creep up in this list a lot, so here's > what I've done to solve my problems. > > My particular problem is that I need to be able to deal with Unicode > data in the URLs as well as the regular request GET/POST data. > > This is a piece

Re: forcing UTF8 data inside django

2006-12-11 Thread mezhaka
On Dec 11, 6:02 am, "Victor Ng" <[EMAIL PROTECTED]> wrote: > Hi all, > > The unicode problem seems to creep up in this list a lot, so here's > what I've done to solve my problems. > > My particular problem is that I need to be able to deal with Unicode > data in the URLs as well as the regular req