Skip to content

Commit fc74b05

Browse files
committed
Add support for UTF-8 in config file
1 parent cf128a3 commit fc74b05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/CPAN/Reporter/Config.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ sub _configure {
154154
$CPAN::Frontend->myprint(
155155
"\nCPAN::Reporter: writing config file to '$config_file'.\n"
156156
);
157-
if ( $config->write( $config_file ) ) {
157+
if ( $config->write( $config_file, "utf8" ) ) {
158158
return $config->{_};
159159
}
160160
else {
@@ -483,7 +483,7 @@ sub _normalize_id_file {
483483

484484
sub _open_config_file {
485485
my $config_file = _get_config_file();
486-
my $config = Config::Tiny->read( $config_file )
486+
my $config = Config::Tiny->read( $config_file, "utf8" )
487487
or $CPAN::Frontend->mywarn("CPAN::Reporter: couldn't read configuration file " .
488488
"'$config_file': \n" . Config::Tiny->errstr() . "\n");
489489
return $config;

0 commit comments

Comments
 (0)