I have Spring boot Kotlin application running on Tomcat 8.5 on JVM 1.8 and connecting to SAP HANA. I use JdbcTemplate.batchUpdate(<string query>)
for inserting data into tables.
I have to deal with German alphabet and that causes some troubles. When I try to write data with SAP HANA Studio correct version of string is written - for example Qualität
is written correctly as Qualität
. When I use JdbcTemplate.batchUpdate
, Qualität
is exported as Qualit�t
.
How can I force JVM/Kotlin/JDBCTemplate to use other than default charset? Or there is other way how to solve this issue?
My current workaround is to replace these characters with their phonetic version (ä
to ae
) but I would like to avoid it.
NCHAR
/NVARCHAR
? – Lars Br.NVARCHAR
and that should be Unicode encoding. I would'n say that Kotlin or JdbcTemplate does some magic with that string... But I will try to put query (right before it is executed) into log and will report result. – Lukas Forst