mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Allow Unicode characters in config.ini. #199
This commit is contained in:
@@ -338,6 +338,7 @@ sub save {
|
|||||||
my ($file) = @_;
|
my ($file) = @_;
|
||||||
|
|
||||||
open my $fh, '>', $file;
|
open my $fh, '>', $file;
|
||||||
|
binmode $fh, ':utf8';
|
||||||
foreach my $opt (sort keys %$Options) {
|
foreach my $opt (sort keys %$Options) {
|
||||||
my $value = get($opt);
|
my $value = get($opt);
|
||||||
$value = $Options->{$opt}{serialize}->($value) if $Options->{$opt}{serialize};
|
$value = $Options->{$opt}{serialize}->($value) if $Options->{$opt}{serialize};
|
||||||
@@ -352,6 +353,7 @@ sub load {
|
|||||||
|
|
||||||
local $/ = "\n";
|
local $/ = "\n";
|
||||||
open my $fh, '<', $file;
|
open my $fh, '<', $file;
|
||||||
|
binmode $fh, ':utf8';
|
||||||
while (<$fh>) {
|
while (<$fh>) {
|
||||||
s/\R+$//;
|
s/\R+$//;
|
||||||
next if /^\s+/;
|
next if /^\s+/;
|
||||||
|
|||||||
Reference in New Issue
Block a user