Support configurable charset for ResourcePropertySource [SPR-10096] #14729
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Sebastien Lorber opened SPR-10096 and commented
In org.springframework.core.io.support.ResourcePropertySource#loadPropertiesForResource
The properties are loaded with:
InputStream is = resource.getInputStream();
props.load(is);
While there should be loaded with:
InputStream is = resource.getInputStream();
InputStreamReader reader = new InputStreamReader(is,charset);
props.load(reader);
And the charset could be added to the constructors, why not with a default UTF-8 charset.
Without that, all property sources loaded with this class are using ISO 8859-1 charset
It seems to affect 3.2 as well because I didn't see any charset in the constructor.
Affects: 3.1.2
Issue Links:
The text was updated successfully, but these errors were encountered: