How execute UTF-8 scripts in unitils / DBunit

542 Views Asked by At

I wrote all SQL scripts for tests using UTF-8. All my java code uses UTF-8 charset. When I tried execute the tests, the unitils/DBunit read them as other encoding (maybe ISO 8859-1).

My database is ORACLE. I tried set 'NLS_LANG=AMERICAN_AMERICA.UTF8' in my enviroment. This setting works in sqlplus, but, no effect in DBunit execution.

Anyone knows how to resolve this?

1

There are 1 best solutions below

1
On

I resolved this issue adding this VM parameter in java command:

-Dfile.encoding=UTF-8

Sergio Marcelo