Author: ikelly
Date: 2009-03-27 14:48:02 -0500 (Fri, 27 Mar 2009)
New Revision: 10175

Modified:
   django/trunk/django/db/backends/oracle/base.py
Log:
Fixed an issue with unicode being mangled in Oracle when the database character 
set is non-unicode.

Modified: django/trunk/django/db/backends/oracle/base.py
===================================================================
--- django/trunk/django/db/backends/oracle/base.py      2009-03-26 02:07:11 UTC 
(rev 10174)
+++ django/trunk/django/db/backends/oracle/base.py      2009-03-27 19:48:02 UTC 
(rev 10175)
@@ -14,6 +14,10 @@
 
 # Oracle takes client-side character set encoding from the environment.
 os.environ['NLS_LANG'] = '.UTF8'
+# This prevents unicode from getting mangled by getting encoded into the
+# potentially non-unicode database character set.
+os.environ['ORA_NCHAR_LITERAL_REPLACE'] = 'TRUE'
+
 try:
     import cx_Oracle as Database
 except ImportError, e:


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to