Open jayMcoder opened 5 years ago
Note: I am able to connect to netezza using isql and nzodbcsql with the driver config
[NetezzaSQL]
Description = ODBC for Netezza
Driver = /usr/local/nz/lib64/libnzodbc.so
Setup = /usr/local/nz/lib64/libnzodbc.so
APILevel = 1
DriverManagerEncoding = UTF-16
UnicodeTranslationOption = utf16
CharacterTranslationOption = all
DebugLogging = true
LogPath = /tmp
PreFetch = 256
Socket = 16384
I too am seeing these encoding / connection issues with the 64 bit Netezza Driver v7.2.1.3 (libnzodbc.so) on RHEL 7. I have tried several encoding options and IANAAppCodePage settings of 4 and 106.
I do get an expected error response that does not have any encoding issue when pointing to the 32 bit ODBC driver.
@v4x8182 I removed unixODBC 64bit driver and installed 32 bit driver. But having the same encoding issue with node-odbc in nodejs application. If you could send the details what packages you modified to install 32 bit unixODBC driver. What I understood from the last line is you are still getting error message but its in English when using 32 bit unixODBC driver, am I right?
@jayMcoder you are correct. Both 32 and 64 bit versions of the Netezza driver were in the package I received. 32 bit version is in the bin and lib directories and 64 bit in the bin64 and lib64 directories. Since node is 64 bit it should point to the 64 bit libraries; however when I set "driver", in the ini file, to the 32 bit file it returns a readable (properly encoded) error of File not found. I am experiencing the exact same issue as you for 64 bit.
@v4x8182 Are you trying to use /lib/libnzodbc.so file for the 32 bit version. If so ldd
@jayMcoder I know this is an old thread; but I've found myself with the same exact problem as you. Did you ever find a solution to the encoding issue? Strange UTF-16 character error message trying to connect from .net Core 3.1 System.Data.Odbc within an ubuntu linux container.
{ [Error: [unixODBC]敓癲牥愠摮漯潰瑲愠瑴楲畢整牡浥瑰y] errors: [ { message: '[unixODBC]敓癲牥愠摮漯潰瑲愠瑴楲畢整牡浥瑰y', state: '奈〰0' } ], error: '[node-odbc] SQL_ERROR', message: '[unixODBC]敓癲牥愠摮漯潰瑲愠瑴楲畢整牡浥瑰y', state: '奈〰0' }
One of the stack overflow answer
You have two issues. Firstly, you have an encoding mismatch between the connection and your program. The string "敓癲牥愠摮漯潰瑲愠瑴楲畢整牡浥瑰y" decoded from UTF-16 to UTF-8 is "Server and/or port attributes are empty" -- which leads us nicely into your second issue.
I am unable to figure what could be the issue here. I followed suggestions on different forums regarding ODBC Netezza SQL driver options. Setting UnicodeTranslationOption = utf16 and DriverManagerEncoding = UTF16, but did not help. Netezza connection string used driver=NetezzaSQL;servername=netezza;port=5480;database=DEV;username=uname;password=pass