From 1aff638884a42bcdc9ee04e1f3ab8b0fb3307201 Mon Sep 17 00:00:00 2001 From: b Date: Sun, 18 Jun 2023 07:31:28 +0000 Subject: [PATCH] fixed encoding option of file opening --- botm_common.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/botm_common.pm b/botm_common.pm index 0e8c405..0277cab 100644 --- a/botm_common.pm +++ b/botm_common.pm @@ -25,7 +25,7 @@ use Encode ('encode', 'decode'); use Exporter; -our $VERSION = '1.0.11'; +our $VERSION = '1.0.12'; our @ISA = qw(Exporter); our @EXPORT = (); our @EXPORT_OK = ( @@ -193,7 +193,7 @@ sub read_data_file { } } else { - unless (open ($fh, "<:$encoding", encode('locale_fs', $file))) { + unless (open ($fh, "<:encoding($encoding)", encode('locale_fs', $file))) { return %data; } } @@ -282,7 +282,7 @@ sub write_data_file { } } else { - unless (open ($fh, ">:$encoding", encode('locale_fs', $file))) { + unless (open ($fh, ">:encoding($encoding)", encode('locale_fs', $file))) { return 0; } } -- 2.30.2