Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 18, 2024
1 parent 30a4797 commit d782c65
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2158,10 +2158,10 @@ private int _outputSurrogatePair(char highSurrogate, char lowSurrogate, int outp
final int unicode = 0x10000 + ((highSurrogate & 0x03FF) << 10)
+ (lowSurrogate & 0x03FF);

_outputBuffer[outputPtr++] = (byte) (0xF0 + ((unicode & 0b00000000_00011100_00000000_00000000) >> 18));
_outputBuffer[outputPtr++] = (byte) (0x80 + ((unicode & 0b00000000_00000011_11110000_00000000) >> 12));
_outputBuffer[outputPtr++] = (byte) (0x80 + ((unicode & 0b00000000_00000000_00001111_11000000) >> 6));
_outputBuffer[outputPtr++] = (byte) (0x80 + (unicode & 0b00000000_00000000_00000000_00111111));
_outputBuffer[outputPtr++] = (byte) (0xF0 + ((unicode >> 18) & 0x07));
_outputBuffer[outputPtr++] = (byte) (0x80 + ((unicode >> 12) & 0x3F));
_outputBuffer[outputPtr++] = (byte) (0x80 + ((unicode >> 6) & 0x3F));
_outputBuffer[outputPtr++] = (byte) (0x80 + (unicode & 0x3F));

return outputPtr;
}
Expand Down

0 comments on commit d782c65

Please sign in to comment.