Commit c8abebcd authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 655472: Print out localconfig as UTF-8 so we don't mangle UTF-8 comments.

r=LpSolit, a=LpSolit
parent 26db6feb
......@@ -245,7 +245,8 @@ sub update_localconfig {
# Move any custom or old variables into a separate file.
if (scalar @old_vars) {
my $filename_old = "$filename.old";
open(my $old_file, ">>$filename_old") || die "$filename_old: $!";
open(my $old_file, ">>:utf8", $filename_old)
or die "$filename_old: $!";
local $Data::Dumper::Purity = 1;
foreach my $var (@old_vars) {
print $old_file Data::Dumper->Dump([$localconfig->{$var}],
......@@ -259,7 +260,7 @@ sub update_localconfig {
}
# Re-write localconfig
open(my $fh, ">$filename") || die "$filename: $!";
open(my $fh, ">:utf8", $filename) or die "$filename: $!";
foreach my $var (LOCALCONFIG_VARS) {
my $name = $var->{name};
my $desc = install_string("localconfig_$name", { root => ROOT_USER });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment