Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-10 Thread Jani Tiainen
10.1.2013 8:59, Ian Kelly kirjoitti: On Wed, Jan 9, 2013 at 11:40 PM, Jani Tiainen wrote: If we just force using force_unicode everything works except in older versions of cx_Oracle (our server had 5.0.4 or something) connection strings can't be unicode for some reason.

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Ian Kelly
On Wed, Jan 9, 2013 at 11:40 PM, Jani Tiainen wrote: > If we just force using force_unicode everything works except in older > versions of cx_Oracle (our server had 5.0.4 or something) connection strings > can't be unicode for some reason. Sure, that's why the check exists in

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Jani Tiainen
9.1.2013 19:21, Ian Kelly kirjoitti: On Wed, Jan 9, 2013 at 3:55 AM, Jani Tiainen wrote: Server is running Oracle Database 10g Release 10.2.0.5.0 - 64bit Production. (EE edition) and charset info: NLS_CHARACTERSETWE8ISO8859P1 NLS_NCHAR_CHARACTERSET AL16UTF16

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Ian Kelly
On Wed, Jan 9, 2013 at 3:55 AM, Jani Tiainen wrote: > Server is running Oracle Database 10g Release 10.2.0.5.0 - 64bit Production. > (EE edition) > > and charset info: > NLS_CHARACTERSETWE8ISO8859P1 > NLS_NCHAR_CHARACTERSET AL16UTF16 Sorry, I meant your web server

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Jani Tiainen
9.1.2013 12:28, Ian kirjoitti: On Wednesday, January 9, 2013 12:38:28 AM UTC-7, Jani Tiainen wrote: Tested against latest master. Same behaviour. In Oracle backend base.py is following piece of code: # Check whether cx_Oracle was compiled with the WITH_UNICODE option. This

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Ian
On Wednesday, January 9, 2013 12:38:28 AM UTC-7, Jani Tiainen wrote: > > Tested against latest master. Same behaviour. > > In Oracle backend base.py is following piece of code: > > # Check whether cx_Oracle was compiled with the WITH_UNICODE option. > This will > # also be True in Python 3.0.

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-09 Thread Jani Tiainen
Ok, found source of the problem - but I don't know the solution. I'm using Oracle client 10.2.0.3.0. It seems that unicode doesn't work there. I compiled cx_Oracle against 11g instantclient 11.2 and it worked just fine. So it must be something that Django assumes with Oracle and unicode

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread Jani Tiainen
Tested against latest master. Same behaviour. In Oracle backend base.py is following piece of code: # Check whether cx_Oracle was compiled with the WITH_UNICODE option. This will # also be True in Python 3.0. if int(Database.version.split('.', 1)[0]) >= 5 and not hasattr(Database,

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread Jani Tiainen
8.1.2013 21:00, akaariai kirjoitti: I created the following test case into django's test suite modeltests/ basic/tests.py: def test_unicode(self): # Note: from __future__ import unicode_literals is in effect... a = Article.objects.create(headline='0

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread akaariai
I created the following test case into django's test suite modeltests/ basic/tests.py: def test_unicode(self): # Note: from __future__ import unicode_literals is in effect... a = Article.objects.create(headline='0 \u0442\u0435\u0441\u0442 test', pub_date=datetime.n ow())

ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread Jani Tiainen
Hi, I've been trying to save UTF-8 characters to oracle database without success. I've verified that database is indeed UTF-8 capable. I can insert UTF-8 characters directly using cx_Oracle. But when I use ORM it will trash characters. Model I use: class MyTest(models.Model): txt =