On Thu, Dec 2, 2010 at 1:21 PM, Anurag Chourasia <[email protected]> wrote: > Hi Ian, > Here is the information requested by you. > $ python > Python 2.5.2 (r252:60911, Dec 2 2008, 09:26:14) > [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import os >>>> print os.environ['NLS_LANG'] > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__ > raise KeyError(key) > KeyError: 'NLS_LANG' >>>> from django.db import connection >>>> connection.cursor() # Initialize the connection >>>> print os.environ['NLS_LANG'] > .UTF8 >>>> print connection.connection.encoding > WINDOWS-1252 >>>> print connection.connection.nencoding > WINDOWS-1252
Weird. From what I can tell, this seems to have something to do with Cygwin, or at least I'm able to replicate it in that environment. Setting NLS_LANG in or out of process and changing the registry key all have no effect. Is there some reason you need to use Cygwin for this? Perhaps you would have more luck with the regular win32 python. Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

