On May 25, 1:07 pm, Andrási László (g) <andrasi.l...@gmail.com> wrote:
> Hi,
>
> We have a problem with an Oracle DB version 10g Release 10.2.0.1.0., Django
> latest svn version and cx_Oracle 5.0.1-2
>
> "select * from nls_database_parameters where parameter='NLS_CHARACTERSET';"
> returns  US7ASCII
>
> We tried to change the NLS_LANG enviroment setting to US7ASCII so we got a
> good result on the page with accentuated letters.
> After that we try to change the data on the form and submit.
> When we tried to insert a new object into the database all the accentuated
> letters where lost.
> We got question marks at those positions.
> We must use US7ASCII, because the database used by the SAP already.
>
> How could we convert the data without loosing letters?

First, don't touch NLS_LANG at all.  NLS_LANG identifies the client
encoding, not the database encoding.  Django uses UTF-8 internally, so
NLS_LANG should be set to that.

Second, Django uses NVARCHAR2 columns by default, so the
NLS_CHARACTERSET setting shouldn't matter; data will be stored using
the NLS_NCHARACTERSET setting, which is necessarily Unicode.  Check
your tables to make sure they're using NVARCHAR2/NCLOB rather than
VARCHAR2/CLOB columns.

Finally, you could be having a problem with bind parameters being
transmitted in the database character set by the Oracle driver,
although I think those problems have been cleared up.  If the above
two steps don't solve the problem, try recompiling cx_Oracle with the
WITH_UNICODE option.

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

Reply via email to