The Wayback Machine - https://web.archive.org/web/20241110214010/https://github.com/JuliaStrings/utf8proc/pull/253/commits/8c7c5a3d147369f46ee1490e1d69871a9c56d20f
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode 15.1 support #253

Merged
merged 7 commits into from
Oct 20, 2023
Prev Previous commit
Next Next commit
fix GB9c logic
  • Loading branch information
stevengj committed Oct 20, 2023
commit 8c7c5a3d147369f46ee1490e1d69871a9c56d20f
10 changes: 2 additions & 8 deletions utf8proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,11 @@ static utf8proc_bool grapheme_break_extended(int lbc, int tbc, int licb, int tic
// Special support for GB9c:
if (licb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT
|| state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT
|| state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND_LINKER1)
|| state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND)
state_ibc = licb;
else if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND)
state_ibc = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER ?
UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND_LINKER1 : UTF8PROC_INDIC_CONJUNCT_BREAK_NONE;
else if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER)
state_ibc = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND ?
UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND2 : UTF8PROC_INDIC_CONJUNCT_BREAK_NONE;
else if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND2)
state_ibc = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER ?
UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER: UTF8PROC_INDIC_CONJUNCT_BREAK_NONE;
UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER : licb;
if (state_ibc == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER
&& ticb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT)
break_permitted = false;
Expand Down
Loading