How to set the encoding for strings being sent/returned by devart ASE ODBC driver
eg from python, I send this unicode string
u'Update Prost_Consent set ConsentRefused_ActionedBy = \\'∆h\\' where PatientID = 417
but whats get stored in ASE are hex bytes
06 68
rather than the ∆h bytes stream I sent in which was
E2 88 86 68
Is the driver set up for 8 bit ascii? How do I tell it some other encoded string is coming in?
How to set encoding for string being sent/returned by devart ASE ODBC driver
Re: How to set encoding for string being sent/returned by devart ASE ODBC driver
hello,
You need to turn on the UseUnicode option on the Advanced Settings tab
You need to turn on the UseUnicode option on the Advanced Settings tab
Re: How to set encoding for string being sent/returned by devart ASE ODBC driver
I am on a Mac.
What setting in the ODBC.ini file or other configuration fe does this set?
What setting in the ODBC.ini file or other configuration fe does this set?
Re: How to set encoding for string being sent/returned by devart ASE ODBC driver
You need to add the UseUnicode=True string in the ODBC.ini file in the DSN setting section for our driver
Re: How to set encoding for string being sent/returned by devart ASE ODBC driver
I found that the answer was with python. I needed to set the string to UTF8 before sending to pyodbc
cursor.execute(theSQL.encode("utf-8"))
cursor.execute(theSQL.encode("utf-8"))
Re: How to set encoding for string being sent/returned by devart ASE ODBC driver
Glad to see that you have found the solution. If you have any other questions, feel free to contact us