mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-05-12 18:48:09 +08:00
Allow Unicode characters in config.ini. #199
This commit is contained in:
parent
74c71b4ef2
commit
419b94e587
@ -338,6 +338,7 @@ sub save {
|
||||
my ($file) = @_;
|
||||
|
||||
open my $fh, '>', $file;
|
||||
binmode $fh, ':utf8';
|
||||
foreach my $opt (sort keys %$Options) {
|
||||
my $value = get($opt);
|
||||
$value = $Options->{$opt}{serialize}->($value) if $Options->{$opt}{serialize};
|
||||
@ -352,6 +353,7 @@ sub load {
|
||||
|
||||
local $/ = "\n";
|
||||
open my $fh, '<', $file;
|
||||
binmode $fh, ':utf8';
|
||||
while (<$fh>) {
|
||||
s/\R+$//;
|
||||
next if /^\s+/;
|
||||
|
Loading…
x
Reference in New Issue
Block a user