1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/env perl use warnings; use strict; use Encode::Locale qw(); use Term::Choose::Constants qw( :screen ); use App::DBBrowser; use if $^O eq 'MSWin32', 'Win32::Console::ANSI'; print "\e(U" if $^O eq 'MSWin32'; binmode STDIN, ':encoding(console_in)'; binmode STDOUT, ':encoding(console_out)'; binmode STDERR, ':encoding(console_out)'; END { print SHOW_CURSOR } print HIDE_CURSOR; my $db_browser = App::DBBrowser->new(); $db_browser->run();
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 31 32 33
#!/usr/bin/env perl use warnings; use strict; use Term::Choose::Constants qw( :screen ); use App::DBBrowser; binmode STDIN, ':encoding(utf-8)'; binmode STDOUT, ':encoding(utf-8)'; binmode STDERR, ':encoding(utf-8)'; my $old_out_codepage; BEGIN { if ( $^O eq "MSWin32" ) { require Win32::Console; require Win32::Console::ANSI; $old_out_codepage = Win32::Console::OutputCP(); Win32::Console::OutputCP( 65001 ); print "\e(U"; } } END { print SHOW_CURSOR; if ( $^O eq "MSWin32" ) { Win32::Console::OutputCP( $old_out_codepage ) if $old_out_codepage; } } print HIDE_CURSOR; my $db_browser = App::DBBrowser->new(); $db_browser->run();
2018-11-25T14:31:58 KuerbisMit Unicode/utf-8 lassen sich alle Zeichen anzeigen.
1
2
3
4
5
0x00f1 0x0e54 0x1058 0x14d1 0x1657 0x1ec5 0x1fbd 0x2465 0x2663 0x27b0
0x2c0f 0x3883 0x3b32 0x3e60 0x45e0 0x46d9 0x46fd 0x480c 0x4a93 0x4e10
0x4e36 0x4e55 0x57a4 0x5a2b 0x5ab5 0x5b6c 0x5f3c 0x6368 0x6849 0x69cb
0x6efd 0x7758 0x7e35 0x8a36 0x8b44 0x93aa 0x9cc8 0xa02b 0xa1d0 0xa27a
0xc015 0xc54a 0xc7be 0xc86c 0xc970 0xcf29
0x264c 0x2652 0x26c5 0x26ea
2018-11-29T10:07:15 KuerbisSoviel ich weiß, gibt es (unabhängig von der Kodierung) bei monospaced Fonts (üblich in Konsolen) drei Characterbreiten: 0, 1 und 2.