Hi ODBC-ers,
I have an ODBC application that can connect to any ODBC enabled back end, and I would like to be able to ask that back-end "what is your default character set", and get back an answer like "utf-8" or "ucs-2" or whatever... The reason I want to do this is because my application uses ucs-2, and if it inserts character data into a back-end that is not ucs-2 enabled (such as mySQL which currently uses utf-8) it will get an exception, so if I know the default character set of the back-end I can translate my character data to utf-8 before I do the insert.
I understand that I can ask an ODBC back-end "what is your default collation sequence?", by using SQL_COLLATION_SEQ with SQLGetInfo, but there is no apparent way for me to get the character set.
Or is there..........?
Many thanks,
Colm.
I have an ODBC application that can connect to any ODBC enabled back end, and I would like to be able to ask that back-end "what is your default character set", and get back an answer like "utf-8" or "ucs-2" or whatever... The reason I want to do this is because my application uses ucs-2, and if it inserts character data into a back-end that is not ucs-2 enabled (such as mySQL which currently uses utf-8) it will get an exception, so if I know the default character set of the back-end I can translate my character data to utf-8 before I do the insert.
I understand that I can ask an ODBC back-end "what is your default collation sequence?", by using SQL_COLLATION_SEQ with SQLGetInfo, but there is no apparent way for me to get the character set.
Or is there..........?
Many thanks,
Colm.