summaryrefslogtreecommitdiffstats
path: root/modules/codepoints.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codepoints.py')
-rwxr-xr-x[-rw-r--r--]modules/codepoints.py5
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)'