简体   繁体   中英

How execute UTF-8 scripts in unitils / DBunit

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?

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

-Dfile.encoding=UTF-8

Sergio Marcelo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM