diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2014-03-24 20:02:25 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2014-03-24 20:02:46 +0400 |
commit | 2a52a318fe9ae37b0844a25a37ea03825142bc80 (patch) | |
tree | bef5318f14d309917c87f96c6d7647c25b19dda1 | |
parent | bf1fd0cf9a4826dd3c34f421a50336931eefb6f3 (diff) |
Error in previous commit: Bugfix: prevent crash when user entered Unicode characters in notes. #1590
-rw-r--r-- | lib/Slic3r/Print.pm | 6 |
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", |