[foreign-memaccess+abi] RFR: 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken [v3]
Sebastian Stenzel
github.com+1204330+overheadhunter at openjdk.java.net
Fri Jul 9 07:44:23 UTC 2021
On Tue, 15 Jun 2021 15:25:29 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> leave encoding and decoding using other character sets (including determining the length of a native string) to be implemented manually.
Can you give us a hint, how such manual re-encoding could look like, if an C lib wants to consume a different charset?
If I call `CLinker.toCString(new String(bytes, UTF-16BE))`, it'll still be converted to UTF-8 internally.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/554
More information about the panama-dev
mailing list