From: Sven Schöling Date: Fri, 5 Jul 2019 17:12:51 +0000 (+0200) Subject: scripts/console: utf8 Kompatibilität und Doku zu Term::ReadLine::Gnu X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~356 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=00a6bdd7580be1c0cd0bc72eafc9af911ae63ff9;p=kivitendo-erp.git scripts/console: utf8 Kompatibilität und Doku zu Term::ReadLine::Gnu --- diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 11098970e..a3d22d994 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -82,6 +82,7 @@ BEGIN { @developer_modules = ( { name => "DBIx::Log4perl", url => "http://search.cpan.org/~mjevans/", }, { name => "Devel::REPL", url => "http://search.cpan.org/~doy/", debian => 'libdevel-repl-perl' }, + { name => "Term::ReadLine::Gnu", url => "http://search.cpan.org/~hayashi/", debian => 'libterm-readline-gnu-perl' }, { name => "Log::Log4perl", url => "http://search.cpan.org/~mschilli/", debian => 'liblog-log4perl-perl' }, { name => "LWP::Simple", url => "http://search.cpan.org/~gaas/", debian => 'libwww-perl', dist_name => 'libwww-perl' }, { name => "Moose::Role", url => "http://search.cpan.org/~doy/", debian => 'libmoose-perl' }, diff --git a/scripts/console b/scripts/console index 8bbe93d69..bf4ffaa6c 100755 --- a/scripts/console +++ b/scripts/console @@ -2,6 +2,8 @@ use warnings; use strict; +use utf8; +use open qw(:std :utf8); use 5.008; # too much magic in here to include perl 5.6 BEGIN { @@ -64,6 +66,10 @@ sub execute_code { my $repl = Devel::REPL->new; $repl->load_plugin($_) for @plugins; $repl->load_history($history_file); + +binmode($repl->out_fh, 'utf8'); + +$repl->eval('use utf8;'); $repl->eval('help'); $repl->print("trying to auto login into client '$client' with login '$login'...\n"); execute_code($repl, "lxinit '$client', '$login'");