summaryrefslogtreecommitdiff
path: root/unidecode
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2010-10-11 19:36:59 +0100
committerTomaz Solc <tomaz.solc@tablix.org>2010-10-12 09:14:17 +0200
commita29c3d42dbbacbce75fcc3b03ffe4639dc93e659 (patch)
tree6cb194a1f21cb9f65ad98e16c02051956af30460 /unidecode
parentc919314b46d4211cac896ef908ee136a96540427 (diff)
downloadunidecode-a29c3d42dbbacbce75fcc3b03ffe4639dc93e659.tar.gz
Handle tables that have less than 256 entries.
Diffstat (limited to 'unidecode')
-rw-r--r--unidecode/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/unidecode/__init__.py b/unidecode/__init__.py
index b32f44a..9de02cf 100644
--- a/unidecode/__init__.py
+++ b/unidecode/__init__.py
@@ -48,7 +48,7 @@ def unidecode(string):
Cache[section] = table = mod.data
- if table:
+ if table and len(table) > position:
retval.append( table[position] )
return ''.join(retval) \ No newline at end of file