dunadan
dunadan

Reputation: 21

CSV to H2 - character encoding missmatch

In my app, I:

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

Answers (1)

Thomas Mueller
Thomas Mueller

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

Related Questions