Thread Frage zu Password und Kodierung
(8 answers)
Opened by Kuerbis at 2013-01-15 20:33
Jetzt habe ich versucht, alles zusammenzutragen, damit alle Dumps etwas ähnliches ausgeben.
Code (perl): (dl
)
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 #!/usr/bin/env perl use warnings; use strict; use 5.10.1; use utf8; use open qw( :encoding(UTF-8) :std ); use Devel::Peek; use Term::ReadPassword; use Term::ReadLine; my $term = Term::ReadLine->new( 'table_watch', *STDIN, *STDOUT ); $term->ornaments( 0 ); print 'Enter: '; my $a = <>; chomp $a; my $b = read_password( 'Enter: ', 0, 1 ); use Encode qw(decode_utf8); $b = decode_utf8( $b ); my $c = $term->readline( 'Enter: ' ); utf8::upgrade( $c ); Dump $a; Dump $b; Dump $c; say $a; say $b; say $c; Code: (dl
)
1 Enter: Ð |