8000 Merge pull request #3385 from jepler/fix-unicode-above-2047 · domdfcoding/circuitpython@715b8d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 715b8d5

Browse files
authored
Merge pull request adafruit#3385 from jepler/fix-unicode-above-2047
Fix decompression of unicode values above 2047
2 parents 365d69e + e829406 commit 715b8d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

supervisor/shared/translate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ STATIC int put_utf8(char *buf, int u) {
5151
*buf = 0b10000000 | (u & 0b00111111);
5252
return 2;
5353
} else { // u <= 0xffff)
54-
*buf++ = 0b11000000 | (u >> 12);
55-
*buf = 0b10000000 | ((u >> 6) & 0b00111111);
54+
*buf++ = 0b11100000 | (u >> 12);
55+
*buf++ = 0b10000000 | ((u >> 6) & 0b00111111);
5656
*buf = 0b10000000 | (u & 0b00111111);
5757
return 3;
5858
}

0 commit comments

Comments
 (0)
0