npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

idb-connector - charset / german special chars

i run a testscript that sends an ‘wrksyssts’ via idb-connector to our ibm i.
the js-script has the ccsid 819.
if i run the script, the special chars are broken.

Größe -> Größe

const idb = require('idb-connector'),
  {dbconn, dbstmt, IN, OUT, CHAR, CLOB} = idb;
const sql = "CALL QXMLSERV.iPLUG512K(?,?,?,?)";
const connection = new dbconn();
const statement = new dbstmt(connection);

const ipc = "*NA";
const ctl = "*here";
const xmlIn = "<xmlservice><sh>system 'wrksyssts'</sh></xmlservice>";
const xmlOut = "";

statement.prepare(sql, () => {
    [ipc, IN, CHAR],
    [ctl, IN, CHAR],
    [xmlIn, IN, CLOB],
    [xmlOut, OUT, CLOB]
  ], () => {
    statement.execute((out) => { // 'out' is an array of output params
      for(let i = 0; i < out.length; i++)
        console.log( out[i] );

Has somebody an idea whats going wrong ?

It is a super-specific question so unfortunately I can’t help, but I would suggest you to create an issue in the repository of idb-connector: they’ll probably be able to help!