Closed spring-projects-issues closed 12 years ago
Juergen Hoeller commented
Thanks for the suggestion! I've added a configurable "sqlScriptEncoding" property to all our AbstractTransactionalXxxSpringContextTests variants (also the one from Spring 2.5's test context framework for JUnit4 and TestNG).
Juergen
Thierry Monney opened SPR-4513 and commented
The method AbstractTransactionalDataSourceSpringContextTests.executeSqlScript uses the platform's default encoding/charset when loading the SQL script. This makes our unit tests fail because they use i18n'ed values that are incorrectly interpreted by the InputStreamReader specified at line 148 (in version 2.0.8, I do not have access to a more recent version at the moment):
LineNumberReader lnr = new LineNumberReader(new InputStreamReader(res.getInputStream()));
should be
LineNumberReader lnr = new LineNumberReader(new InputStreamReader(res.getInputStream(), encoding));
with the encoding variable maybe set by dependency injection :-)
No further details from SPR-4513