The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

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:

Error: Code: -869 Msg: Database server cannot convert data from/to character set 'UTF-8'

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!

asked 01 Jul '16, 03:58

VGenev's gravatar image

accept rate: 0%

What happens when you use the CHARSET connection parameter?

(04 Jul '16, 02:54) Volker Barth

When I use it like that:

./dbisqlc -c ";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.

(04 Jul '16, 04:07) VGenev

I edited the above comment. So I tried with NONE and cp1251 both on SACHARSET and ODBC keys and still the same.

(04 Jul '16, 04:12) VGenev
Replies hidden

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...

(04 Jul '16, 05:26) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 01 Jul '16, 03:58

question was seen: 372 times

last updated: 04 Jul '16, 05:26