From 45c7bac9080d91b53c686e776fc6217d7f139b86 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 12 Apr 2023 03:01:14 +0000 Subject: CTAN sync 202304120301 --- support/latexindent/LatexIndent/LogFile.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'support/latexindent/LatexIndent/LogFile.pm') diff --git a/support/latexindent/LatexIndent/LogFile.pm b/support/latexindent/LatexIndent/LogFile.pm index 93b6ad0930..5847ca42f4 100644 --- a/support/latexindent/LatexIndent/LogFile.pm +++ b/support/latexindent/LatexIndent/LogFile.pm @@ -129,12 +129,9 @@ ENDQUOTE # cruft directory ${$self}{cruftDirectory} = $switches{cruftDirectory} || ( dirname ${$self}{fileName} ); - # diacritics in cruft directory (highlighted in https://github.com/cmhughes/latexindent.pl/pull/439) - ${$self}{cruftDirectory} = decode( "utf-8", ${$self}{cruftDirectory} ); - # if cruft directory does not exist if ( !( -d ${$self}{cruftDirectory} ) ) { - $logger->fatal("*Could not find directory ${$self}{cruftDirectory}"); + $logger->fatal( "*Could not find directory " . decode( "utf-8", ${$self}{cruftDirectory} ) ); $logger->fatal("Exiting, no indentation done."); $self->output_logfile(); exit(6); @@ -143,6 +140,8 @@ ENDQUOTE my $logfileName = ( $switches{cruftDirectory} ? ${$self}{cruftDirectory} . "/" : '' ) . ( $switches{logFileName} || "indent.log" ); + $logfileName = decode( "utf-8", $logfileName ); + # details of the script to log file $logger->info("*$FindBin::Script version $versionNumber, $versionDate, a script to indent .tex files"); $logger->info("$FindBin::Script lives here: $FindBin::RealBin/"); @@ -247,7 +246,7 @@ ENDQUOTE } $logger->info("*Directory for backup files and $logfileName:"); - $logger->info("${$self}{cruftDirectory}"); + $logger->info( $switches{cruftDirectory} ? decode( "utf-8", ${$self}{cruftDirectory} ) : ${$self}{cruftDirectory} ); # output location of modules if ( $FindBin::Script eq 'latexindent.pl' or ( $FindBin::Script eq 'latexindent.exe' and $switches{trace} ) ) { -- cgit v1.2.3