Reputation: 21
In my app, I:
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?
Upvotes: 2
Views: 2820
Reputation: 50087
UTF-8 needs to be set in the options parameter of the CSVREAD
function, as follows:
CSVREAD('file.csv', null, 'charset=UTF-8')
Upvotes: 3