Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle NLS parameters #53

Open
K-C-E opened this issue Apr 14, 2014 · 1 comment
Open

Oracle NLS parameters #53

K-C-E opened this issue Apr 14, 2014 · 1 comment

Comments

@K-C-E
Copy link

K-C-E commented Apr 14, 2014

Need some help.
I have an Oracle database, and to retrieve the data I need to set an environment variable NLS_LANG.
Usually I do it like this:
$ENV{NLS_LANG} ="AMERICAN_AMERICA.CL8MSWIN1251";
If I run the Dancer2 application with Dancer-Plugin-Database
in standalone mode - it works. When I run it through plackup or Starman I get the data in a wrong encoding . Where should I register NLS_LANG and possibly other language variables for Oracle?

Thank you.

@bigpresh
Copy link
Owner

Sorry for the hugely late reply to this. I'm afraid I have no idea about Oracle, so I don't know what help I can offer here - but I'd think that setting NLS_LANG before executing the app should work, whichever way you execute it.

However, the docs for DBD::Oracle suggest:

For oracle versions >= 9.2 you can specify the client charset and ncharset with the ora_charset and ora_ncharset attributes. You still need to pass ora_envhp = 0 for all but the first connect.

... with the example:

$dbh = DBI->connect ($dsn, $user, $passwd, {ora_charset => 'AL32UTF8'});

So, if you still have this problem (or if not, for the benefit of anyone else who does and finds this issue) I'd recommend putting ora_charset in the dbi_params section of the D::P::D configuration and see if that works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants