X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/7d1044e5e4df51459cafb742090ce62b52d9e087..7d7f1c50e63ee9882e6c538dfa2c0dfb23e2a44b:/rfc1345convert diff --git a/rfc1345convert b/rfc1345convert index 412bac1..d33377f 100644 --- a/rfc1345convert +++ b/rfc1345convert @@ -77,6 +77,17 @@ for (values %info) { # mark unofficial extras as such $info{$_}->{category} .= ' Xz' for @extra; +for (keys %di) { + # find control characters (first 32 chars from 0 and 128) + next if $di{$_} & ~0b1001_1111; + # rename to something more descriptive + $info{$_}->{name} = $info{$_}->{unicode10} + ? '<'.$info{$_}->{unicode10}.'>' # the old name was much more useful + : sprintf('', $di{$_}); # at least identify by value + # show descriptive symbols instead of control chars themselves + $di{$_} += 0x2400 if $di{$_} < 32; +} + # output perl code of hash # (assume no backslashes or curlies, so we can just q{} w/o escaping) print "{\n";