mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Allow Unicode characters in config.ini. #199
This commit is contained in:
@@ -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+/;
|
||||
|
||||
Reference in New Issue
Block a user