Skip to content

Commit

Permalink
Merge pull request #7 from raylu/master
Browse files Browse the repository at this point in the history
don't print control chars
  • Loading branch information
garabik authored Aug 21, 2016
2 parents f3bd27c + 82906e8 commit 782c5f8
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 782c5f8

Please sign in to comment.