On Mon, 2007-11-05 at 12:00 -0800, ygneo wrote: > I use Django 0.96 in a SuSE with Python 2.3.3. > > I'm getting this JavaScript error: "gettext is not defined" when I try > to edit an object with date field in the admin site. I have seen that > occurs when calendar.js is trying to populate the month names in the > correct language. I use language_code = es_ES and default_charset = > utf-8 and i have configurated apache to use utf-8 as default charset. > I also have found with FireBug that really the error is a Django > error: > > UnicodeEncodeError at /convenios/admin/jsi18n/ > 'ascii' codec can't encode character u'\xe9' in > position 23: > > For this reason jsi18n doesn't load and i can't use gettext. > > Otherwise, in an Ubuntu installation of Django, with same lang code, > and Python 2.5.1, all works fine.
Using non-ASCII characters with Django 0.96 is unfortunately not completely solid. Sometimes things work, sometimes they don't. It's why we had to put all the work into making things use unicode internally. Translations are an area that are particularly vulnerable to problems, since ASCII strings end up being changed to non-ASCII. There's a not a lot we can do about this except recommend that you upgrade to use subversion trunk (which will require a bit of porting of your code). I realise that might not be the easiest solution, but, as I said, it wasn't possible to fix all the problems without a major change, so at some point we had to make that change. Regards, Malcolm -- The sooner you fall behind, the more time you'll have to catch up. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---