-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locale support #36
Comments
@leosurban, can you give a sample SQL script to create a DB and a table with some data for me to test this out (similar to test/support/test-db.sql)? Most likely this is due to ASCII/UTF-8 conversion issues 😃. |
And ODT file (Zipped) because with Unicode encoded contetent may be better way than UNL single-codeset file. See end of document for INSERT statements. |
It seems to work OK with UTF-8. Using dbaccess (data from
Using Node.js: informix
.query( 'select * from exampletable' )
.then( ( cursor ) => {
return cursor.fetchAll( { close : true } );
} )
.then( ( results ) => {
console.log( results );
} )
.catch( ( err ) => {
console.log( err );
} );
Here's a UTF-8 data unload for reference: |
@leosurban, can you set the windows command prompt and CLIENT_LOCAL to utf-8 and check whether it resolves the issue? Although ESQL/C support CLIENT_LOCAL when retrieving data, within Node.js all strings are treated as utf-8 so CLIENT_LOCAL should be set to utf-8. But there's no conversion from utf-8 to PC-LATIN-2 which I believe is why you are seeing encoding issues on command prompt. Either setting command prompt to utf-8 or using a conversion library for display purposes should resolve your issue. |
Sorry, no, it is not working. mode con codepage select=65001 node ixtest.js What is setting of your Linux (?) terminal when you receive this (correct) result? |
I'm using Linux UTF-8.
A quick search seem to suggest you'll need Lucida Console font as well for UTF-8 support on windows command prompt which I assume you are using?
… On 18 Feb 2017, at 13:37, leosurban ***@***.***> wrote:
Sorry, no, it is not working.
mode con codepage select=65001
set CLIENT_LOCALE=cs_CZ.UTF8
echo select somename from exampletable | dbaccess LocaleTest
… correct result …
node ixtest.js
… bad result …
What is setting of your Linux (?) terminal when you receive this (correct) result?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Looks like there's a conversion issue somewhere on windows. Don't have access to a windows PC now to debug this but will try to take a look later this week. |
Probably. I created small test with important result.
What is important:
Thank you. |
Tested this on a Windows 7 VM and encoding works fine. However my DB is in en_us.819 (default?).
|
So need to check,
|
Took a little bit of time to update my Informix images to include extended GLS support but finally managed to reproduce this issue on Linux 😃.
If I don't set |
I can't get cs_CZ.cp1250, cs_CZ.pc-latin-2, cs_CZ.8859-2 locales to work. They throw -23101/-23104 errors on my 12.10 FC8DE installation (client SDK 4.10 FC8DE) even through I selected all available GLS components during installation. @leosurban, If you have a DB that I can access I can look into this more (probably will need a client SDK that supports your locales as well) but it does seem to suggest a settings mismatch is the likely culprit. For reference, you can use the docker images I used ( |
@uditha-atukorala Please send me mail to **** at kolin.cz to get access to test server. Thanks. (UA) Edit: Mask email. |
Looking at
On Windows there are a bunch of files which seems to be OS specific. e.g. czech.lc
|
Hello, My previous comment looks it is solved for now with the following environment variables: |
Hi, |
Unfortunately not, I didn't have a client SDK with the necessary locale to test this fully. If at all possible, using a UTF8 variant seem to solve the issue (#issuecomment-280939778). |
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:
Same setting, same window:
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:
The text was updated successfully, but these errors were encountered: