From 65c7ce67f005c974628d90ea7ebeb967695ca4d9 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Tue, 6 Oct 2009 11:55:32 -0400 Subject: [PATCH] fixed hex/decimal confusion --- case-study-porting-chardet-to-python-3.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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