Use UTF-8 charset for reading files for initializing the database (javax.persistence.sql-load-script-source scripts)

Description

One of the WildFly users reports in this forum thread https://developer.jboss.org/thread/271498 that the application runs into an issue trying to populate data in a database via the database initialization scripts configured via javax.persistence.sql-load-script-source property, for UTF-8 charset content.

Reading the JPA spec, there's no specific mention of what encoding is expected/supported for such files, so I don't think this is a bug, but I think supporting UTF-8 (apparently the JPA provider in GlassFish does) for such files would make sense.

Environment

Hibernate shipped with WildFly 10.0.0.Final

Activity

Show:
jaikiran
July 20, 2016, 7:47 AM
Vlad Mihalcea
July 21, 2016, 1:18 PM

We have discussed this internally, and we should add a configuration property which tells the encoding of the underlying script files. In the absence of such setting, the default JVM setting will be used.

Vlad Mihalcea
September 15, 2016, 9:32 AM

, you might be interested in this issue for 5.0 and 5.1

Assignee

Vlad Mihalcea

Reporter

jaikiran

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure