1diff --git a/bin/gscan2pdf b/bin/gscan2pdf
2index e075b0f2..ff124522 100755
3--- a/bin/gscan2pdf
4+++ b/bin/gscan2pdf
5@@ -3434,9 +3434,11 @@ sub save_image {
6 if ( @{$list_of_pages} > 1 ) {
7 my $w = length scalar @{$list_of_pages};
8 for ( 1 .. @{$list_of_pages} ) {
9+ _utf8_on($filename);
10 my $current_filename =
11 sprintf "${filename}_%0${w}d.$SETTING{'image type'}",
12 $_;
13+ _utf8_off($filename);
14 if ( -f $current_filename ) {
15 my $text = sprintf __('This operation would overwrite %s'),
16 $current_filename;
17@@ -3450,11 +3452,15 @@ sub save_image {
18 return;
19 }
20 }
21+ _utf8_on($filename);
22 $filename = "${filename}_%0${w}d.$SETTING{'image type'}";
23+ _utf8_off($filename);
24 }
25 else {
26 if ( $filename !~ /[.]$SETTING{'image type'}$/ixsm ) {
27+ _utf8_on($filename);
28 $filename = "$filename.$SETTING{'image type'}";
29+ _utf8_off($filename);
30 return if ( file_exists( $file_chooser, $filename ) );
31 }
32 return if ( file_writable( $file_chooser, $filename ) );