java - CSV to H2 - character encoding missmatch -


in app, i:

  • let hibernate create h2 db
  • populate db through jdbc sql statement csv import (insert ... select ... csvread(file.csv)). file in utf-8 encoding.

on linux special characters in db correct.

on windows (default encoding cp1250) special characters incorrect.

when try different csv file encoding (cp1250, iso-8859-2), works on windows, not on linux.

is there way tell h2 needs respect utf-8 encoding on windows?

utf-8 needs set in options parameter of csvread function, follows:

csvread('file.csv', null, 'charset=utf-8') 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -