Allow Unicode characters in config.ini. #199

degen-loop-screen
Alessandro Ranellucci 2012-02-12 23:33:25 +01:00
parent 74c71b4ef2
commit 419b94e587
1 changed files with 2 additions and 0 deletions

View File

@ -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+/;