[foreign-memaccess+abi] RFR: 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken [v4]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Jun 15 18:13:51 UTC 2021
On Tue, 15 Jun 2021 15:33:18 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> 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
Looks sensible!
-------------
Marked as reviewed by mcimadamore (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/554
More information about the panama-dev
mailing list