diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index fea392206..67aa3759f 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -795,6 +795,9 @@ sub write_gcode { 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'; + # write some information my @lt = localtime; printf $fh "; generated by Slic3r $Slic3r::VERSION on %04d-%02d-%02d at %02d:%02d:%02d\n\n",