zeldigas / spring-hocon-property-source

Property source loader for Spring that is able to parse and load HOCON config files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.conf files read using default charset

binoternary opened this issue · comments

According to HOCON spec

files must be valid UTF-8

But in HoconPropertySourceLoader the InputStreamReader that is created uses the default charset:

Config config = ConfigFactory.parseReader(new InputStreamReader(resource.getInputStream()),
                ...

To me it seems that line should instead be

Config config = ConfigFactory.parseReader(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8),
                ...

@binoternary true, I'll fix that this weekend. (sorry for super late answer)

Fix pushed and published to central. Many thanks for your patience :)