diff --git a/case-study-porting-chardet-to-python-3.html b/case-study-porting-chardet-to-python-3.html index 5d0ac3d..415e770 100755 --- a/case-study-porting-chardet-to-python-3.html +++ b/case-study-porting-chardet-to-python-3.html @@ -630,7 +630,7 @@ TypeError: unorderable types: int() >= str() - (aStr[1] <= '\xF1'): - return ord(aStr[1]) - 0x9F, charLen + if len(aBuf) > 1: -+ if (aBuf[0] == 0x202) and \ ++ if (aBuf[0] == 202) and \ + (aBuf[1] >= 0x9F) and \ + (aBuf[1] <= 0xF1): + return aBuf[1] - 0x9F, charLen