diff -Nur -x '*.orig' -x '*.rej' e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf mezzanine_patched_e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf --- e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf 2008-05-14 10:37:23.000000000 -0600 +++ mezzanine_patched_e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf 2008-05-14 10:37:05.000000000 -0600 @@ -81,8 +81,7 @@ #warn "updating script $file for lang $lang\n"; my $navdb = $navdbs{$lang}; my $navinfo = NAVIGATIONDIR . "/navigation.$lang"; - unlink $navinfo unless $navdb; - $navdb ||= esmith::ConfigDB->create($navinfo) or + $navdb ||= esmith::ConfigDB->open($navinfo) or die "Couldn't create $navinfo\n"; $navdbs{$lang} ||= $navdb; my $rec = $navdb->get($file) || @@ -96,7 +95,20 @@ if (-f $lfile) { # Do a quick and dirty parse of the lexicon file - my $xml = $parser->parsefile($lfile); + my $xmlstr = ""; + open(FILE, $lfile) or die "Couldn't open $lfile:\n$!"; + binmode(FILE, ":utf8"); + { + local $^W = 0; + while ( my $line = ) { + unless ( utf8::valid($line) ) { + warn "$lfile not in UTF-8 format\n"; + utf8::encode($line); + } + $xmlstr .= $line; + } + } + my $xml = $parser->parsestring($xmlstr); my @lexicon = @{$xml->[1]}; shift @lexicon; # Remove lexicon attributes while (@lexicon)