[1.0.X] Fixed an issue with unicode being mangled in Oracle when the database character set is non-unicode. Backport of r10175 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2e05920401
commit
cdbc225e0b
|
@ -14,6 +14,10 @@ except ImportError:
|
||||||
|
|
||||||
# Oracle takes client-side character set encoding from the environment.
|
# Oracle takes client-side character set encoding from the environment.
|
||||||
os.environ['NLS_LANG'] = '.UTF8'
|
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:
|
try:
|
||||||
import cx_Oracle as Database
|
import cx_Oracle as Database
|
||||||
except ImportError, e:
|
except ImportError, e:
|
||||||
|
|
Loading…
Reference in New Issue