On 01-Nov-07, at 2:25 PM, Ivan Sagalaev wrote:
> Ah... So this is what you called "ascii cannot decode etc" in your > original post? This is an absolutely different issue that has > nothing to > do with Python's default usage of ascii for decoding or even Django's > unicode internals. > > What happens here is your Postgres database is configured to store > data > in Latin 1 encoding. Thus it just cannot store any non-ascii > characters, > including that curly single quote. If you want to do this you have to > either encode your data manually into something containing only ascii > characters (like using \u0000 or � escapes) or just convert the > database to be in a more capable encoding (any unicode that that > version > of Postgres would support). this has opened a whole can of worms. The site in question is by nature a mulitilingual site with matter in several Indian languages. The database was unicode. There is a trac attached to the site, also with a unicode database. And both the trac db and the site db (both postgres) were accepting non-ascii characters until recently.I looked today and found that *all* the non-ascii stuff entered over the past nearly two years looked like junk. I now checked and found that all these databases show encoding as Latin1. I am 99% sure that they were unicode before, as I have been making my databases as unicode for the past 5-6 years. I had done a dist-upgrade from sarge to etch recently, and the problems seem to have started there. But I find it difficult to believe that a dist-upgrade would change encoding of the database. The dist-upgrade also changed python from 2.3.5 to 2.4. I now backed up the database, changed the encoding and restored it, and it is now accepting everything. Anyway, thanks for making me check again. -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---