-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 22
-
Component/s: core-libs
-
None
Code snippet to get issue:
String str = "Hello World";
MemorySegment.ofArray(new byte[(str.length()+1)*4]).setString(0, str, StandardCharsets.UTF_32);
Same outcome with UTF_16 charset
String str = "Hello World";
MemorySegment.ofArray(new byte[(str.length()+1)*4]).setString(0, str, StandardCharsets.UTF_32);
Same outcome with UTF_16 charset