#30954: NVARCHAR2 fields are not using cx_Oracle.NCHAR
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
jaumemoral |
Type: Bug | Status: new
Component: Database | Version: 2.2
layer (models, ORM) |
Severity: Normal | Keywords: oracle charset
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When inserting or updating NVHARCHAR2 fields and we need to store special
char in a parameter "x" we need to use
cursor.setinputsizes(x=cx_Oracle.NCHAR)
I found this is this discussion
https://github.com/oracle/python-cx_Oracle/issues/119
As far as I know, this is not implemented in Oracle backend. In
OracleParam class, input_size is used with some data types (TIMESTAMP,
CLOB...) but not for NCHAR. I tried to patch it forcing NCHAR in every
string, but I'm sure this is not the best way to do it.
We can see this bug in an Oracle DB with ISO8859 charset, when using
models with CharField (that maps to NVARCHAR2) and with any non-iso8859
character (for example, "ć"). Without the patch, this special chars turn
into "¿" in database.
--
Ticket URL: <https://code.djangoproject.com/ticket/30954>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.6458abac9c46fef5b6b01b5d336e8bb3%40djangoproject.com.