Opened 16 years ago

Closed 15 years ago

#10566 closed (fixed)

Support cx_Oracle compiled with WITH_UNICODE

Reported by: Erin Kelly Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: oracle unicode
Cc: Matt Boersma Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If cx_Oracle 5.0.1+ is compiled with the WITH_UNICODE option, then it expects unicode inputs and rejects str inputs. Currently the oracle backend only passes encoded strings and so won't work with this setup.

This is something we'll need to address eventually as Django moves to Python 3.0 support, but another use case may be when running Django together with other software in the same Apache instance, resulting in NLS_LANG confusion, as documented in this thread: http://groups.google.com/group/django-users/browse_thread/thread/fb812a572168bfc8?hl=en

Attachments (2)

10566.diff (2.9 KB ) - added by Erin Kelly 16 years ago.
10566-2.diff (4.3 KB ) - added by Erin Kelly 16 years ago.
This revised patch avoids a bug where calling setinputsizes with an NCLOB argument results in an error under cx_Oracle 5.0.1 with unicode.

Download all attachments as: .zip

Change History (5)

comment:1 by Malcolm Tredinnick, 16 years ago

Triage Stage: UnreviewedAccepted

This should be fairly routine, since we already do a bunch of conversions more or less in one place and we can hook in there. The only potential challenge is knowing when to do this. Is it detectable from querying something in cx_oracle? Or do we need to add a DATABASE_OPTIONS key for it so that the user can tell us?

by Erin Kelly, 16 years ago

Attachment: 10566.diff added

comment:2 by Erin Kelly, 16 years ago

Has patch: set

This patch seems to work, but I haven't run the full test suite or the gis tests yet.

by Erin Kelly, 16 years ago

Attachment: 10566-2.diff added

This revised patch avoids a bug where calling setinputsizes with an NCLOB argument results in an error under cx_Oracle 5.0.1 with unicode.

comment:3 by Erin Kelly, 15 years ago

Resolution: fixed
Status: newclosed

(In [11477]) Fixed #10566: Added support for cx_Oracle compiled with the WITH_UNICODE flag.

Note: See TracTickets for help on using tickets.
Back to Top