blob: 4482923ff9d9417dc0ee2ce53c9c5db851684665 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Convert +-| style drawings into utf characters
# BoxDraw-unicode-box to ascii
# 2003-11-25 12:48:17 -- created by nsg
use 5.8.0;
use strict;
use utf8;
# binmode (STDOUT, ":utf8"); # incompatible with perl 5.6.1
# binmode (STDIN, ":utf8"); # incompatible with perl 5.6.1
while(<STDIN>) {
my $l=length;
tr/┌┬┐╓╥╖╒╤╕╔╦╗├┼┤╟╫╢╞╪╡╠╬╣└┴┘╙╨╜╘╧╛╚╩╝/++++++++++++++++++++++++++++++++++++/;
tr/═─│║/\-\-\|\|/;
printf "%03d ",$l;
print ;
}
# corners/splits:
# ┌┬┐╓╥╖╒╤╕╔╦╗ 6ec
# ├┼┤╟╫╢╞╪╡╠╬╣ 7fd
# └┴┘╙╨╜╘╧╛╚╩╝ 3b9
# round corners:
# 256d 256e
# 2570 256f
# horizontal
# ═ ─
# vertical
# │ ║
|