Some sundry fixes and improvements to the modules.
This commit is contained in:
5
modules/codepoints.py
Normal file → Executable file
5
modules/codepoints.py
Normal file → Executable file
@@ -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)'
|
||||
|
||||
Reference in New Issue
Block a user