jni-rs: Invocation API uses wrong encoding for options
The JVM Invocation API requires options to be in the platform default encoding, while Rust’s CString always uses UTF-8 as far as I can tell (unless the code is really non-obvious). While this is (usually) correct on Linux and macOS, it isn’t at all on Windows.
local_encoding_ng might help here.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- Properly encode JVM options on Windows. Fixes #410. UTF-8 is still assumed on other platforms. — committed to argv-minus-one/jni-rs by argv-minus-one a year ago
- Properly encode JVM options on Windows. Fixes #410. UTF-8 is still assumed on other platforms. — committed to argv-minus-one/jni-rs by argv-minus-one a year ago
I’ve posted PR #414, which adds code to transcode strings properly on Windows. Next I will look into doing the same for POSIX platforms.