-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
7.10.0.Final, 7.20.0.Final, 7.28.0.Final
-
None
-
None
-
Windows. Can be reproduced on other OSes using "-Dfile.encoding=latin1".
-
2019 Week 50-52 (from Dec 9)
-
NEW
-
NEW
When a resource is added using KieHelper.addResource, any specified encoding is ignored when it is added to the MemoryFileSystem by KieFileSystemImpl.write(Resource) (effectively assuming the InputStream is already encoded in UTF-8).
Additionally, when the resource is read again by AbstractKieModule.getResource, it constructs a Resource object with no encoding specified, whereas it should probably specify an encoding of UTF-8, since it seems that sources are considered to be UTF-8 already at least in the case of the MemoryKieModule.
I've attached a fairly minimal test case where the rules bytes are passed in UTF-8 with the encoding explicitly specified. This currently produces an error when the default file encoding is not UTF-8 (eg, by passing -Dfile.encoding=latin1 as a JVM argument, or by using the default arguments on Windows).