/[smeserver]/rpms/e-smith-manager/sme8/e-smith-manager-1.14.0-encoding.patch
ViewVC logotype

Annotation of /rpms/e-smith-manager/sme8/e-smith-manager-1.14.0-encoding.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Oct 7 18:44:02 2008 UTC (16 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 slords 1.1 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
2     --- e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf 2008-05-14 10:37:23.000000000 -0600
3     +++ mezzanine_patched_e-smith-manager-1.14.0/root/etc/e-smith/events/actions/navigation-conf 2008-05-14 10:37:05.000000000 -0600
4     @@ -81,8 +81,7 @@
5     #warn "updating script $file for lang $lang\n";
6     my $navdb = $navdbs{$lang};
7     my $navinfo = NAVIGATIONDIR . "/navigation.$lang";
8     - unlink $navinfo unless $navdb;
9     - $navdb ||= esmith::ConfigDB->create($navinfo) or
10     + $navdb ||= esmith::ConfigDB->open($navinfo) or
11     die "Couldn't create $navinfo\n";
12     $navdbs{$lang} ||= $navdb;
13     my $rec = $navdb->get($file) ||
14     @@ -96,7 +95,20 @@
15     if (-f $lfile)
16     {
17     # Do a quick and dirty parse of the lexicon file
18     - my $xml = $parser->parsefile($lfile);
19     + my $xmlstr = "";
20     + open(FILE, $lfile) or die "Couldn't open $lfile:\n$!";
21     + binmode(FILE, ":utf8");
22     + {
23     + local $^W = 0;
24     + while ( my $line = <FILE> ) {
25     + unless ( utf8::valid($line) ) {
26     + warn "$lfile not in UTF-8 format\n";
27     + utf8::encode($line);
28     + }
29     + $xmlstr .= $line;
30     + }
31     + }
32     + my $xml = $parser->parsestring($xmlstr);
33     my @lexicon = @{$xml->[1]};
34     shift @lexicon; # Remove lexicon attributes
35     while (@lexicon)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed