1
0
Fork
You've already forked Unicode
1

Bit-handling error affecting display of U+0400 to U+07FF #2

Open
opened 2024年06月15日 18:31:16 +02:00 by dsalt · 0 comments

The error is in a comparison which checks for <= 0x3FF instead of <= 0x7FF (or < 0x800). This causes code points U+0400 to U+07FF to be encoded incorrectly, resulting in invalid UTF-8 sequences.

Example:

$ ./unicode U+0400
U+0400: CYRILLIC CAPITAL LETTER IE WITH GRAVE
 Character: ���
 Category: Letter, Uppercase
 Text direction: Left-to-Right
 Decomposition: Composition of U+415 and U+0300
 Lowercase equivalent: U+0450

This is fixed in dsalt/Unicode@2a60b63dfb (see #1).

The error is in a comparison which checks for `<= 0x3FF` instead of `<= 0x7FF` (or `< 0x800`). This causes code points U+0400 to U+07FF to be encoded incorrectly, resulting in invalid UTF-8 sequences. Example: ``` $ ./unicode U+0400 U+0400: CYRILLIC CAPITAL LETTER IE WITH GRAVE Character: ��� Category: Letter, Uppercase Text direction: Left-to-Right Decomposition: Composition of U+415 and U+0300 Lowercase equivalent: U+0450 ``` This is fixed in dsalt/Unicode@2a60b63dfb67e2c9111e422ecbfd85f5468b8d82 (see #1).
Sign in to join this conversation.
No Branch/Tag specified
master
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Hanicef/Unicode#2
Reference in a new issue
Hanicef/Unicode
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?