Closed mariano closed 12 years ago
@mariano confirmed, all is ok.
you can set Environment encoding NLS_LANG
and NLS_NCHAR
in JS land
process.env['NLS_LANG']='SIMPLIFIED CHINESE_CHINA.AL32UTF8';
process.env['NLS_NCHAR']='SIMPLIFIED CHINESE_CHINA.ZHS16GBK';
var oracle = require('db-oracle');
new oracle.Database({hostname : 'localhost',
user : 'test',
password : 'test',
database :'grid'
}).connect(function(error) {
//do sth here.....
});
@roymax: that's great, but could you try the new charset
and ncharset
args? So the above example you gave would be instead (notice how i am not using process.env):
var oracle = require('db-oracle');
new oracle.Database({
hostname: 'localhost',
user: 'test',
password: 'test',
database: 'grid',
charset: 'SIMPLIFIED CHINESE_CHINA.AL32UTF8',
ncharset: 'SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
}).connect(function(error) {
//do sth here....
});
You will obviously have to build from the GIT repository, or update the latest db-oracle
Yes, I have been tested.
This refers to #26: Environment encoding should be able to be set from JS land.