Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2014-03-24 20:02:25 +0400
committerAlessandro Ranellucci <aar@cpan.org>2014-03-24 20:02:46 +0400
commit2a52a318fe9ae37b0844a25a37ea03825142bc80 (patch)
treebef5318f14d309917c87f96c6d7647c25b19dda1
parentbf1fd0cf9a4826dd3c34f421a50336931eefb6f3 (diff)
Error in previous commit: Bugfix: prevent crash when user entered Unicode characters in notes. #1590
-rw-r--r--lib/Slic3r/Print.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm
index 15851badc..094b09518 100644
--- a/lib/Slic3r/Print.pm
+++ b/lib/Slic3r/Print.pm
@@ -702,11 +702,11 @@ sub write_gcode {
} else {
Slic3r::open(\$fh, ">", $file)
or die "Failed to open $file for writing\n";
+
+ # enable UTF-8 output since user might have entered Unicode characters in fields like notes
+ binmode $fh, ':utf8';
}
- # enable UTF-8 output since user might have entered Unicode characters in fields like notes
- binmode $fh, ':utf8';
-
# write some information
my @lt = localtime;
printf $fh "; generated by Slic3r $Slic3r::VERSION on %04d-%02d-%02d at %02d:%02d:%02d\n\n",