Skip to content

Commit

Permalink
don't print control chars
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu-stripe committed Aug 20, 2016
1 parent f3bd27c commit 82906e8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions unicode
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,16 @@ def print_characters(clist, maxcount, format_string, query_wikipedia=0, query_wi
except UnicodeError:
in_additional_charset = "NONE"

if properties['combining']:
pchar = " "+c
category = properties['category']
category_desc = general_category[category]
if category == 'Cc': # control character
pchar = ''
else:
pchar = c
if properties['combining']:
pchar = " "+c
else:
pchar = c

uppercase = properties['uppercase']
lowercase = properties['lowercase']
opt_uppercase = opt_lowercase = ''
Expand All @@ -648,8 +654,6 @@ def print_characters(clist, maxcount, format_string, query_wikipedia=0, query_wi
ord_lowercase = ord(properties['lowercase'])
opt_lowercase = '\n{green}Lowercase:{default} {ord_lowercase:04X}'.format(**locals())
flipcase = lowercase
category = properties['category']
category_desc = general_category[category]

opt_numeric = ''
numeric_desc = ''
Expand Down

0 comments on commit 82906e8

Please sign in to comment.