On 8/31/17 1:44 PM, Anthony Scarpino wrote:
On 08/31/2017 01:10 PM, Ivan Gerasimov wrote:
Hello!
Currently, when reading the pkcs11 config file, the default encoding
is assumed.
This causes errors when the encoding is set to UTF-16.
Would you please help review the trivial fix?
Bug: https://bugs.openjdk.java.net/browse/JDK-8187023
Webrev: http://cr.openjdk.java.net/~igerasim/8187023/00/webrev/
I thought config files were only ASCII only?
That's correct.
I should have been more clear: the error occurs when the config file is
read by an application with -Dfile.encoding=UTF-16
In that case the config file is tried to be treated as encoded with UTF-16.
The solution is to explicitly specify the charset when the config file
is opened for reading.
With kind regards,
Ivan
If someone puts a UTF-16 character into the configuration file, are
we sure it won't cause problems with the native library too? PKCS11
itself only supports UTF-8.
Tony