On Fri, 2 Jun 2023 18:36:56 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> test/jdk/java/io/File/libGetXSpace.c line 142:
>> 
>>> 140:     for (int i = 0; i < len; i++) {
>>> 141:         chars[i] = (char)strchars[i];
>>> 142:     }
>> 
>> Is this `memcpy(chars, strchars, len);`
>
> I don't think so if `chars` is `char *` and `strchars` is `jchar*` as I think 
> `char` is 8 bits and `jchar` is 16 bits.

I just wonder if jchar is UTF-16 and char is platform encoding, would it work 
by simply casting the low 8bit to char?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14276#discussion_r1214882192

Reply via email to