[foreign-memaccess+abi] RFR: 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken [v4]
Jorn Vernee
jvernee at openjdk.java.net
Tue Jun 15 15:33:18 UTC 2021
> The problem is that we only add a single 0 byte as a null terminator, regardless of the charset used. For wider char sets, more 0 bytes need to be added. For instance, for UTF_16LE two 0 bytes need to be added.
>
> This patch fixes the issue by adding the null terminator to the Java string, and only then encoding it as a `byte[]`.
Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
Typo in comment
-------------
Changes:
- all: https://git.openjdk.java.net/panama-foreign/pull/554/files
- new: https://git.openjdk.java.net/panama-foreign/pull/554/files/aba2b1a1..273acec0
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=554&range=03
- incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=554&range=02-03
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/554.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/554/head:pull/554
PR: https://git.openjdk.java.net/panama-foreign/pull/554
More information about the panama-dev
mailing list