• Marcel van Lohuizen's avatar
    exp/locale/collate: fixed two bugs uncovered by regression tests. · 10838165
    Marcel van Lohuizen authored
    The first bug was that tertiary ignorables had the same colElem as
    implicit colElems, yielding unexpected results. The current encoding
    ensures that a non-implicit colElem is never 0.  This fix uncovered
    another bug of the trie that indexed incorrectly into the null block.
    This was caused by an unfinished optimization that would avoid the
    need to max out the most-significant bits of continuation bytes.
    This bug was also present in the trie used in exp/norm and has been
    fixed there as well. The appearence of the bug was rare, as the lower
    blocks happened to be nearly nil.
    
    R=r
    CC=golang-dev
    https://golang.org/cl/6127070
    10838165
trie_test.go 2.5 KB