Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix a broken link in a comment in is_normalized.
This link doesn't work.

Going back through that UAX's history to find the version that was
current when this code was added in commit 7a0fedf in 2009-04,
we find that that anchor still works in that version:
  https://www.unicode.org/reports/tr15/tr15-29.html#Annex8

It's a section heading "14. Detecting Normalization Forms".  Happily
the anchor that the corresponding section heading now offers looks
much more reasonable -- it's the title of the section -- and so likely
to be long-term stable.  ("Annex 8" seems like some kind of editing
error.)  Switch to that.
  • Loading branch information
gnprice committed Aug 28, 2019
commit 4025110d9db5507e1804c4d297cb2fc821ca95c4
8 changes: 6 additions & 2 deletions Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,12 @@ is_normalized(PyObject *self, PyObject *input, int nfc, int k)
if (self && UCD_Check(self))
return NO;

/* The two quickcheck bits at this shift mean 0=Yes, 1=Maybe, 2=No,
as described in http://unicode.org/reports/tr15/#Annex8. */
/* This is an implementation of the following algorithm:
https://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms
See there for background.
*/

/* The two quickcheck bits at this shift mean 0=Yes, 1=Maybe, 2=No. */
quickcheck_mask = 3 << ((nfc ? 4 : 0) + (k ? 2 : 0));

i = 0;
Expand Down