On Mar 20, 6:51 am, elm <ernesto.la...@gmail.com> wrote: > > Are you sharing the web server with web applications written using > > something else, such as PHP? If PHP is playing with the language > > settings, you might be hitting an ordering problem. That is, it works > > if any PHP code gets executed first in a specific process and doesn't > > otherwise, or vice versa. > > Thanks Graham ... the system indeed has web applications in PHP. And > this could be a source of the conflict. > > To be honest ... I am a little bit lost with the coding configuration > for receiving data from the DB. Where should the coding be > configured? > > I assume that my Django settings (and the DB configuration) should > have the controls ... but is it also dependant on the apache, php, > mod_python configuration? > > If php is messing around with the coding (and it is beyond my control) > how can I force UTF8 in my django applications?
As far as I know, the NLS_LANG environment variable is the only way to specify the client encoding in cx_Oracle. If that can't be relied upon within your Apache process, then I think you would need to run Django either as a CGI or under a separate Apache process. Another possibility is to upgrade your cx_Oracle to version 5.0.1. Then cx_Oracle will return strings as unicode to begin with, and the particular problem you're seeing should go away. But it's only half a solution, because strings passed in to cx_Oracle will still be utf8- encoded and might still be mistaken for latin1. The fix to *that* would involve compiling cx_Oracle 5.0.1 with the WITH_UNICODE option, and then fixing up the backend so that it passes in unicode. I don't think that's a major task, but it may require some knowledge of Django internals. Regards, Ian --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---