Browse files

Merge pull request #26 from tojocky/patch-1

Al32 UT8 enviroment
  • Loading branch information...
2 parents ac7b755 + adcce8d commit 0e972f49f95469eec1709b311233ced8fd4c2d23 @mariano committed Feb 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/
@@ -6,7 +6,7 @@ node_db_oracle::Connection::Connection()
connection(NULL) {
this->port = 1521;
this->quoteName = '"';
- this->environment = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::THREADED_MUTEXED);
+ this->environment = oracle::occi::Environment::createEnvironment("AL32UTF8","AL32UTF8", oracle::occi::Environment::THREADED_MUTEXED);
if (this->environment == NULL) {
throw node_db::Exception("Cannot create environment");

7 comments on commit 0e972f4

this's bullshit hardcode.


mariano replied Mar 20, 2012

@roymax: I am unfamiliar with AL32UTF8. Do you recommend we go back to no encoding set?


mariano replied Mar 20, 2012

@roymax: Actually it's just better if we add a setting for both encoding paramters. So you could define AL32UTF8 or whatever you want in JS land


mariano replied Mar 20, 2012

@roymax: see #28

i hate this hardcode, because i lose 8h in today.
in my case , oracle is SIMPLIFIED CHINESE_CHINA.ZHS16GBK and Ubuntu LANG is zh_CN.UTF-8
when changed the 2nd param is ZHS16GBK i get my chinese string 中文

this->environment = oracle::occi::Environment::createEnvironment("AL32UTF8","ZHS16GBK", oracle::occi::Environment::THREADED_MUTEXED);

actually, the parameter charset and ncharset in oracle document description is (see this)

- charset
    Character set id that will replace the one specified in NLS_LANG.

- ncharset
    Character set id that will replace the one specified in NLS_NCHAR.

so, back to no encoding set and set Ubuntu env, i get 中文 again.


but i am not test at insert or update is right. i will do it later.
english is not good ,sorry.


mariano replied Mar 21, 2012

@roymax: I just pushed up the fix for #28. So you should now have two additional options for the connection, charset, and ncharset

You specify them when creating the connection (just as you do with the host and stuff)

I haven't even make a build to try it because I am away from my dev machine, could you try it out?


Please sign in to comment.