diff options
author | Sean B. Palmer <http://inamidst.com/sbp/> | 2008-03-01 21:07:23 +0000 |
---|---|---|
committer | Sean B. Palmer <http://inamidst.com/sbp/> | 2008-03-01 21:07:23 +0000 |
commit | 1078791cb60d3ce4543d579fc07b9c0c145e8d10 (patch) | |
tree | a4169992239556f33b8154cb35a676c3bd8e8620 /modules/codepoints.py | |
parent | 3d920f431789ac53596933785b5fe61463335e3b (diff) | |
download | bot-1078791cb60d3ce4543d579fc07b9c0c145e8d10.tar.gz bot-1078791cb60d3ce4543d579fc07b9c0c145e8d10.tar.bz2 bot-1078791cb60d3ce4543d579fc07b9c0c145e8d10.zip |
Some sundry fixes and improvements to the modules.
Diffstat (limited to 'modules/codepoints.py')
-rwxr-xr-x[-rw-r--r--] | modules/codepoints.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/codepoints.py b/modules/codepoints.py index d966670..f2eb862 100644..100755 --- a/modules/codepoints.py +++ b/modules/codepoints.py @@ -12,7 +12,10 @@ from itertools import islice def about(u, cp=None, name=None): if cp is None: cp = ord(u) - if name is None: name = unicodedata.name(u) + if name is None: + try: name = unicodedata.name(u) + except ValueError: + return 'U+%04X (No name found)' % cp if not unicodedata.combining(u): template = 'U+%04X %s (%s)' |