From 4f23572566d6d1a65233b5c76c7bc9d0568b15be Mon Sep 17 00:00:00 2001 From: Jun Kuriyama Date: Thu, 9 Nov 2006 15:10:11 +0000 Subject: [PATCH] Add a workaround to avoid unexpected exception during processing iso-2022-jp encoding with specific character. Approved by: maintainer --- textproc/py-chardet/Makefile | 2 +- textproc/py-chardet/files/patch-escsm.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 textproc/py-chardet/files/patch-escsm.py diff --git a/textproc/py-chardet/Makefile b/textproc/py-chardet/Makefile index 1f6b660b65fa..a876ba87d9b3 100644 --- a/textproc/py-chardet/Makefile +++ b/textproc/py-chardet/Makefile @@ -6,7 +6,7 @@ PORTNAME= chardet PORTVERSION= 1.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= textproc python MASTER_SITES= http://chardet.feedparser.org/download/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/textproc/py-chardet/files/patch-escsm.py b/textproc/py-chardet/files/patch-escsm.py new file mode 100644 index 000000000000..330b6ce09b55 --- /dev/null +++ b/textproc/py-chardet/files/patch-escsm.py @@ -0,0 +1,11 @@ +--- chardet/escsm.py.orig Mon Nov 6 17:01:26 2006 ++++ chardet/escsm.py Mon Nov 6 17:01:37 2006 +@@ -180,7 +180,7 @@ + eError,eError,eError,eError,eItsMe,eError,eStart,eStart,# 40-47 + ) + +-ISO2022JPCharLenTable = (0, 0, 0, 0, 0, 0, 0, 0) ++ISO2022JPCharLenTable = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + + ISO2022JPSMModel = {'classTable': ISO2022JP_cls, + 'classFactor': 10,