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
SQLExecuteDirect corrupting language string [ODBC138] #135
Comments
Modified by: Eric Martin (ericm)Attachment: Surfliibrary.zip [ 12098 ] description: I have firebird working mostly just fine for converting our access databases over to firebird.. Using a MFC based application that opens up access and firebird and populates Firebird... I can create tables, insert data, delete data, just fine. when I try to convert a string over from Italian and use SQLExecDirect(hstmt, SQL, SQL_NTS); It changes all the characters from the italian database ( access ) to "?" the numbers come through fine. I converted everything from a Multibyte character set to UNICODE and it still does it?? I'm not sure if I did something wrong but Like I said it seems to work fine for other languages I have tried? I have a file I can send and access file I can send and pictures but your JIRA doesn't allow for me to add those??? => I have firebird working mostly just fine for converting our access databases over to firebird.. Using a MFC based application that opens up access and firebird and populates Firebird... I can create tables, insert data, delete data, just fine. when I try to convert a string over from Italian and use SQLExecDirect(hstmt, SQL, SQL_NTS); It changes all the characters from the italian database ( access ) to "?" the numbers come through fine. I converted everything from a Multibyte character set to UNICODE and it still does it?? I'm not sure if I did something wrong but Like I said it seems to work fine for other languages I have tried? |
Commented by: Eric Martin (ericm) I added the access mdb I'm going from and the Firebird database I'm converting too.. Also added a picture of the access and Firebird result with Flame Robin... |
Modified by: Eric Martin (ericm)Attachment: Untitled.png [ 12099 ] |
Commented by: @alexpotapchenko I think it is not bug in the driver, this is problem of your application but you did not attach its code. |
Modified by: @alexpotapchenkopriority: Critical [ 2 ] => Major [ 3 ] security: Developers [ 10012 ] => |
Modified by: Eric Martin (ericm)Attachment: Alex.png [ 12101 ] |
Commented by: Eric Martin (ericm) Thanks Alexander for such fast response... VERY appreciated! I have three questions: 1. How do you create the Firebird database with WIN1251 ? 2. Does this mean I can go back to Multibyte character set instead of UNICODE? ( do you suggest this ) 3. The code I use is below to execute direct SQL calls, see picture Alex.png I put a break point at that point to see that string right before it enters the SQLExecDirect call... it does have the characters in it correctly.. bool CSQLUtilityDlg::executeSQL (SQLWCHAR *SQL,SQLHANDLE hOdbcEnv,SQLHANDLE hDbConn)
} Thanks again... |
Commented by: @alexpotapchenko 1) you can read it for example - http://www.destructor.de/firebird/charsets.htm |
Commented by: Eric Martin (ericm) >Give you a simple test case Also I used the ODBC record sets to connect to Access not sure if that has any affect on firebird .. it seems not to... It's odd that there is Russian characters in the Italian database... :o) ( but since I'm russian challenged I wouldn't have known that... ) |
Commented by: Eric Martin (ericm) Another question: Is there a universal Charset that will accept these languages: Chinese(Simplifed, traditional ), Finnish, French, German, Italian, Japanese, Korean, Polish, Russian, Spanish, Sedish, English |
Commented by: @alexpotapchenko >Is there a universal Charset that will accept these languages >Sure, let me figure out that charsets and see if that helps and I will also get you a simple case... |
Commented by: Eric Martin (ericm) GOOD NEWS Alexander, I figured it out with your help...!! THANKS! ( ERROR in Creation of ODBC ) see picture...? 1. I re-created database with UTF8 and tried many ways ... all fail?? ( maybe I did it wrong? ) swprintf(create_db, _T("CREATE DATABASE '%s' user 'SYSDBA' password 'masterkey' DEFAULT CHARACTER SET UTF8"), new_dbname); BUT registry doesn't set the CHARACTER SET ->UTF8 ( I type in utf8 into registry ...it works) ( See picture! ) |
Modified by: Eric Martin (ericm)Attachment: Alex2.png [ 12102 ] |
Commented by: @alexpotapchenko This registry key stores ODBC datasorce settings and it is edited using odbcad32.exe utility. |
Commented by: Eric Martin (ericm) OK, >This registry key stores ODBC datasorce settings and it is edited using odbcad32.exe utility. 1. IF so why is it created then when the isc_dsql_execute_immediate is called? 2. When I manually type in UTF8 in that character set it works...!? |
Modified by: @alexpotapchenkostatus: Open [ 1 ] => Resolved [ 5 ] resolution: Won't Fix [ 2 ] Fix Version: 2.0 [ 10044 ] |
Modified by: @alexpotapchenkostatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Eric Martin (ericm)
Attachments:
Surfliibrary.zip
Untitled.png
Alex.png
Alex2.png
I have firebird working mostly just fine for converting our access databases over to firebird..
Using a MFC based application that opens up access and firebird and populates Firebird...
I can create tables, insert data, delete data, just fine.
when I try to convert a string over from Italian and use SQLExecDirect(hstmt, SQL, SQL_NTS); It changes all the characters from the italian database ( access ) to "?" the numbers come through fine. I converted everything from a Multibyte character set to UNICODE and it still does it??
I'm not sure if I did something wrong but Like I said it seems to work fine for other languages I have tried?
The text was updated successfully, but these errors were encountered: