In my app, I:
- let Hibernate create H2 DB
- populate DB through JDBC SQL statement with CSV import (
INSERT INTO ... SELECT ... FROM CSVREAD(file.csv)
). File is in UTF-8 encoding.
On Linux special characters in the DB are correct.
On Windows (default encoding cp1250) special characters are incorrect.
When I try different CSV file encoding (cp1250, iso-8859-2), it works on Windows, but not on Linux.
Is there any way to tell H2 it needs to respect UTF-8 encoding on Windows?
CSVREAD
exactly? Did you useCSVREAD('file.csv', null, 'charset=UTF-8')
as documented? – Thomas Mueller