nqp icon indicating copy to clipboard operation
nqp copied to clipboard

[JVM] Reimplement nqp::encode for utf-16

Open usev6 opened this issue 2 years ago • 0 comments

Starting from the bug reported in https://github.com/Raku/nqp/issues/250 it turned out that the old implementation gave different results than MoarVM for all buffer types (at least in some cases). The new code doesn't try to take shortcuts, but just works through all code points one by one, translates them to UTF-16 code points and puts those into the result buffer.

I'd guess at least the encodeUTF32 method needs a similar rework.

usev6 avatar Nov 26 '21 20:11 usev6