JERSEY-2293: Iterate over codepoints instead of individual code units when encoding