fix test for Blocked condition in canonical normalization
authorChristophe Rhodes <csr21@cantab.net>
Sun, 14 Apr 2013 19:02:08 +0000 (20:02 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sat, 18 May 2013 19:04:04 +0000 (20:04 +0100)
Would most likely otherwise fail in Jamo with combining characters in
between.

src/code/target-char.lisp

index 6791452..ef51c23 100644 (file)
@@ -773,7 +773,9 @@ character exists."
       (tagbody
        again
          (when (and (> (- i previous-starter-index) 2)
-                    (= (ucd-ccc (lref result i)) (ucd-ccc (lref result (1- i)))))
+                    ;; test for Blocked (Unicode 3.11 para. D115)
+                    (>= (ucd-ccc (lref result (1- i)))
+                        (ucd-ccc (lref result i))))
            (when (= (ucd-ccc (lref result i)) 0)
              (setf previous-starter-index i))
            (incf i)