-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hi,
I have trouble with our locales. We are using czech locale for Central Europe, CP1250 on Windows, with PC-LATIN-2 on DOS command window.
So my settings is:
SET DB_LOCALE=cs_CZ.cp1250
SET CLIENT_LOCALE=cs_CZ.pc-latin-2
This leads to correct result:
echo SELECT nazevmater FROM cenmat | dbaccess mydb
All characters are correctly displayed, including diactritic, see screenshot.
Same setting, same window:
node ixtest.js
var opts = {
database : 'mydb@ixlur',
username : 'informix',
password : '***'
};
var informix = require( 'informix' )( opts );
informix
.query( "select nazevmater from cenmat" )
.then( function ( cursor )
{
return cursor.fetchAll();
} )
.then( function ( results )
{
console.log( 'results:', results );
})
.catch( function ( err )
{
console.log( err );
} );
It is working but diacritic characters are missing (? is displayed, see screenshot).
My database is encoded as CP1250, so DB_LOCALE is correct.
In our Windows application with CP1250 is all ok, in DBACCESS, with pc-latin-2, too.
With node-informix I tried CLIENT_LOCALE set to cs_CZ.cp1250, cs_CZ.pc-latin-2, cs_CZ.UTF8, result same - ? characters.
But your application (ESQL) read locales, because when I set wrong locale:
SET CLIENT_LOCALE=cs_CZ.bad
then error is displayed:
node ixtest.js
Error: [-23101] Unable to load locale categories.
at Error (native)
python -V
Python 2.7.13
node -v
v6.7.0
npm list informix
node-api@ C:\buffer\jsrest
`-- informix@0.5.4