1 | #! perl |
1 | #! perl |
|
|
2 | |
|
|
3 | =head1 NAME |
|
|
4 | |
|
|
5 | block-graphics-to-ascii - map block graphics to ascii characters |
|
|
6 | |
|
|
7 | =head1 DESCRPTION |
|
|
8 | |
|
|
9 | A not very useful example of filtering all text output to the terminal |
|
|
10 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
|
|
11 | similar-looking ascii character. |
|
|
12 | |
|
|
13 | =cut |
2 | |
14 | |
3 | # simple example that uses the add_lines hook to filter unicode and vt100 line/box graphics |
15 | # simple example that uses the add_lines hook to filter unicode and vt100 line/box graphics |
4 | |
16 | |
5 | # ─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏ |
17 | # ─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏ |
6 | my $rep_unicode = "--||--||--||++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--||" |
18 | my $rep_unicode = "--||--||--||++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--||" |