mariano / node-db-oracle

Oracle database bindings for Node.js
http://nodejsdb.org
141 stars 34 forks source link

UTF-8 Support Documentation #48

Open jlubean opened 11 years ago

jlubean commented 11 years ago

You should update your documentation to include instructions on UTF-8 support. Through some investigative work, Ryan Allen, a co-worker of mine, found that you must specify a value of "utf8" for both the "charset" and "ncharset" options. It only works if both options are set.

new oracle.Database({
    charset: 'utf8',
    ncharset: 'utf8',
    hostname: conf.get("oracleHostName"),
    port: conf.get("oraclePort"),
    user: conf.get("oracleUser"),
    password: conf.get("oraclePassword"),
    database: conf.get("oracleDatabase")
  }).connect(function(error) {
      // execute query
});