Skip to content

add query for native script title form #22

Closed
dchud opened this Issue Jun 5, 2012 · 8 comments

2 participants

@dchud
dchud commented Jun 5, 2012

Either implement in launchpad-perl or include the necessary info here.

@cummingsm cummingsm was assigned Jun 5, 2012
@cummingsm
GWU Libraries member

Pushed demo script to launchpad-perl repository. Sent MARC function documentation to group. Will implement in launchpad-perl.

@dchud dchud was assigned Jun 18, 2012
@dchud
dchud commented Jun 19, 2012

query works, but there's a problem with django's environment talking to oracle.

@dchud
dchud commented Jun 20, 2012

I've narrowed down the problem to django's opinionated forcing of the environment var NLS_LANG to '.UTF8'. Due to the way voyager stores data in oracle, we need it to be set to '.US7ASCII', but Django is overriding attempts to change this using os.environ.

More details w/examples of the problem:

https://gist.github.com/2960200

Examples of resistance from django committers to change their opinion:

https://code.djangoproject.com/ticket/12714
http://osdir.com/ml/DjangoUsers/2009-05/msg02053.html

Trying the "recompile cx_oracle with WITH_UNICODE" option, but i don't think that will even help, because the problem is that we need NLS_LANG = '.US7ASCII'.

@dchud
dchud commented Jun 20, 2012

Works after a patch to django's oracle driver:

diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.
index 64e038e..9ce2797 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -32,7 +32,7 @@ def _setup_environment(environ):

 _setup_environment([
     # Oracle takes client-side character set encoding from the environment.
-    ('NLS_LANG', '.UTF8'),
+    ('NLS_LANG', '.US7ASCII'),
     # This prevents unicode from getting mangled by getting encoded into the
     # potentially non-unicode database character set.
     ('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'),

but this is not a good solution.

@cummingsm
GWU Libraries member
@dchud
dchud commented Jun 20, 2012

We might need to ship with the django patch approach.

I re-opened a similar django ticket at https://code.djangoproject.com/ticket/15313#comment:4

@dchud dchud added a commit that closed this issue Jun 20, 2012
@dchud dchud adding support for native title display, including tweak to django so…
…urce documented in README, closes #22
77301f3
@dchud dchud closed this in 77301f3 Jun 20, 2012
@dchud dchud added a commit that referenced this issue Jun 20, 2012
@dchud dchud resolving conflicts, refs #22 49fcd83
@dchud
dchud commented Nov 28, 2012

update w/r/to django ticket: see also https://code.djangoproject.com/ticket/18844 for possible movement in the right direction.

@dchud dchud added a commit that referenced this issue Jan 23, 2014
@dchud dchud revisited annoying django-patching strategy for handling Voyager insi…
…stence on ASCII connections, fixes #345, refs #22
cf8d4c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.