Hi guys, I am using the sqlanywhere node.js driver on OSX to connect to remote SQLANywhere 9 database. The database character encoding is set to Windows 1251 - 1251CYR. I am receiving the following error:
I tried to set environment variable SACHARSET to both 1251CYR and UCA (UNIX alternative) and added to the ODBC DBN configuration key CharSet to both values and I am still receiving the same error. I will much appreciate any help how can I set this connection parameter in my case. Thank you! |
What happens when you use the CHARSET connection parameter?
When I use it like that:
./dbisqlc -c "HOST=trinitiesb.cloudapp.net:2638;DatabaseName=...;UserId=...;Password=...;CS=NONE"
It is connected and returns cp1251 as a charset parameter. I tried with NONE and cp1251 for the ODBC and SACHARSET environment variable and it is again the same error.
I edited the above comment. So I tried with NONE and cp1251 both on SACHARSET and ODBC keys and still the same.
Hm, the value for CHARSET is not a codepage like cp1251 but a character set label - does "CS=ISO_8859-5:1988" (or whatever fits your OS / locale) work for you?
That being said, I had suspected that SQL Anywhere 9 (as it does not offer NCHAR data internally) might reject UTF-8 as charset, however, the prequel SQL Anywhere 8 does list UTF8 as supported charset with "dbinit -le". Does "CS=UTF8" work?
Sorry, that's all I can offer, others will know better...