ClickHouse / clickhouse-odbc

ODBC driver for ClickHouse
https://clickhouse.tech
Apache License 2.0
239 stars 84 forks source link

Unable to retrieve german umlauts from ClickHouse using ODBC (only) #417

Open esanumIT opened 1 year ago

esanumIT commented 1 year ago

Hi,

we got lots of (unicode encoded) German Umlauts in our Clickhouse DB, which are retrieved fine, when selecting via the JDBC Connector within DBeaver, but using the ODBC Connector in Dbeaver (we need the data to be available via ODBC for other tools, but for simplicity of the bug report, I did set both up in DBeaver), we get broken characters back, eventhough we're using the Clickhouse ODBC Unicode driver!?!

String in the Database (for potential reproducability?): "3 Impfpassbeispiele: Wie hätten Sie entschieden?" Quiz auf esanum – Ihr Ergebnis

Result using the JDBC Driver: image

Result using the ODBC Driver: image

Driver used in ODBC: image

Any suggestions/ideas?

breslavsky commented 1 year ago

I have the same problem :-( What can we do?

breslavsky commented 1 year ago

@slapshin can we fix it by ourself?

slapshin commented 1 year ago

@breslavsky @esanumIT please check answer from https://stackoverflow.com/questions/34205727/set-dsn-encoding-for-odbc-driver-11-for-sql-server-on-windows-10

When using ODBC on Windows, the database client charset is defined in the language settings for non-Unicode applications. The current ANSI code page (ACP) is used by the SQL Server client.

On Windows 10, click Start and type Region, select Region & language settings and click Administrative language settings. Click Change system locale and check Use unicode UTF-8 ...
esanumIT commented 1 year ago

@slapshin thanks. While that DOES work as a work-around, it means, that there is literally no sense in offering an ANSII and a UNICODE Version of the Driver, because BOTH follow the logic you describe, so I can only get Unicode OR ANSII, but not both, using the two different drivers, currently. So I'd argue, this is still a valid Issue/Bug report.