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

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

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


Revision 1.1 - (hide annotations) (download)
Thu May 15 13:38:21 2008 UTC (16 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: e-smith-manager-1_14_0-17_el4_sme, e-smith-manager-1_14_0-19_el4_sme, e-smith-manager-1_14_0-20_el4_sme, e-smith-manager-1_14_0-18_el4_sme
* Mon Mar 31 2008 Shad L. Lords <slords@mail.com> 1.14.0-17
- No longer remove navigation dbs. [SME: 4147]
- Deal a little more gracefully with non UTF-8 lexicons [SME: 4229]

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