You can clone with
HTTPS or Subversion.
I use Hebrew code page on mysql.
English letters are Ok, however Hebrew letters come out wrong.
When I use mysql native driver all is OK.
I guess all non UFT8 code pages has the same problem.
What does your connection string look like? Have you tried specifying the charset connection parameter? (http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html)
OK. I will have to research this. We just use SQLGetData(..., buffer, ...) to get the values from ODBC and then String::New(buffer). I'm not sure what needs to be done so that V8 will play nice with other code pages.
SQLGetData(..., buffer, ...)
The issue might be that we were specifying SQL_CHAR for TargetType in the case of
SQLLEN * StrLen_or_IndPtr);
Better results might be had if using SQL_C_WCHAR, but I am not sure. I have tried testing this against my MSSQL server which has some Hebrew characters in an NVARCHAR field, but am not getting those same characters back. Not sure where the problem lies.
If you have working C++ ODBC code, what does your SQLGetData() call look like?
OK, I think I have resolved this issue; at least as far as my tests go. It's going to have to cook for a while though before it makes its way to a release.
The issue was a combination of previously using SQL_CHAR for the TargetType and the buffer being a char* buffer which has been changed to uint16_t* buffer
You can get the code from my v0.4-separation branch:
I want to check this fix now. how do I install this:
You can use npm to install from git repositories if you are on a system that has git; like this:
npm install git://github.com/wankdanker/node-odbc.git#v0.4-separation
Where everything after the # is a branch, tag or commit hash.
It would be nice if you would test the v0.5 branch also/instead. That version has a test runner and some tests which include a Unicode test that may be related to your issue.
npm install git://github.com/wankdanker/node-odbc.git#v0.5
If you are on Windows, you will have to grab a zip file from github of the branch or tag. Here is a link to the v0.5 zip file:
Hope this helps,
run npm install to pull in the bindings module.
I'm not sure if I understand what you are asking. But you could also install the bindings module by downloading a zip file from github (https://github.com/TooTallNate/node-bindings/archive/master.zip) and placing the contents in your-odbc-folder/node_modules/bindings
It should include the fix and it work OK for me. But, I may be missing something.
Could you post your MySQL Create Table statement, some insert statements and your select statement for your test case? We need to get on the same page so I can see what is going on.
I created a quick test case of my own and had to use charset=utf8 in the connection string to get it to work.
Hey @orenz, if you are still having this issue, try installing with npm install git://github.com/wankdanker/node-odbc.git or npm install https://github.com/wankdanker/node-odbc/archive/v0.5.16.tar.gz and let me know how it goes.
npm install git://github.com/wankdanker/node-odbc.git
npm install https://github.com/wankdanker/node-odbc/archive/v0.5.16.tar.gz
This may or may not be fixed here: https://github.com/wankdanker/node-odbc/tree/v0.5.17.
Going to close this issue due to inactivity.