Replacing Utf8Decoder with default implementation ( NioDecoder ) gives first part of UTF-16 representation (0xD800).
brianSun 17 Apr 2011
Well the problem with moving above plane 0 is that it doesn't work so hot with Java's 16-bit chars and you start having to use surrogate pairs. I haven't really done any testing of Fantom's libraries with surrogate pairs and in many cases what I've seen it requires excessive performance trade-offs. So still seems like the best thing is to fail fast if you try to read a char over 16-bit limit?
vkuzkokov Sun 17 Apr 2011
Reading UTF-8 of U+10000
results in runtime error.
Replacing
Utf8Decoder
with default implementation (NioDecoder
) gives first part of UTF-16 representation (0xD800).brian Sun 17 Apr 2011
Well the problem with moving above plane 0 is that it doesn't work so hot with Java's 16-bit chars and you start having to use surrogate pairs. I haven't really done any testing of Fantom's libraries with surrogate pairs and in many cases what I've seen it requires excessive performance trade-offs. So still seems like the best thing is to fail fast if you try to read a char over 16-bit limit?