The previous implementation borked on emoji because invoking
char.toString on a single UTF-8 part of a larger UTF-16 pair results in
the encoding presenting "?" as the value.
This implementation works primarily on Bytes and avoids having to invoke
char.toString and therefore is capable of correctly encoding emoji
characters into a UTF-8 url encoded path segment.
This did involve re-working some of the valid character detection for
path segments, so there is likely a delta to the overall performance,
but I think it should be negligible.
Closes #213
The previous implementation borked on emoji because invoking char.toString on a single UTF-8 part of a larger UTF-16 pair results in the encoding presenting "?" as the value.
This implementation works primarily on Bytes and avoids having to invoke char.toString and therefore is capable of correctly encoding emoji characters into a UTF-8 url encoded path segment.
This did involve re-working some of the valid character detection for path segments, so there is likely a delta to the overall performance, but I think it should be negligible.