From: Dobrica Pavlinusic Date: Sun, 23 Feb 2003 15:47:40 +0000 (+0000) Subject: last changes; completly broken charsets X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=355410c2ce3ddee5c07248bc837f479b11678e29;hp=71eb1a3ef1b80945704bf52ae864c9ad9f160ce2;p=webpac last changes; completly broken charsets git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@35 13eb9ef6-21d5-0310-b721-a9d68796d827 --- diff --git a/WebPac.pm b/WebPac.pm index d79040b..73080ae 100644 --- a/WebPac.pm +++ b/WebPac.pm @@ -109,8 +109,10 @@ sub show_results_list { push @swish_results, { nr => ($#swish_results + 2), path => $hit->swishdocpath, - headline => $from_utf8->convert($hit->headline), - html => back2html($from_utf8->convert($hit->html)), +# headline => $from_utf8->convert($hit->headline), +# html => back2html($from_utf8->convert($hit->html)), + headline => $hit->headline, + html => back2html($hit->html), rank => $hit->swishrank }; }, diff --git a/all2xml.conf b/all2xml.conf index e310397..20f7898 100644 --- a/all2xml.conf +++ b/all2xml.conf @@ -11,25 +11,25 @@ xml_codepage = ISO8859-2 # this is arbirary xml added to each record (e.g. Library identifier # or something like that - xml=Knjiga + xml=Knjiga [ge-libri] isis_db=/data/isis_data/small/ge/LIBRI/LIBRI type=isis xml_codepage = ISO8859-2 - xml=Knjiga + xml=Knjiga [ps-peri] isis_db=/data/isis_data/small/ps/PERI/PERI type=isis xml_codepage = ISO8859-2 - xml=Èasopis + xml=Èasopis [kk-arti] isis_db=/data/isis_data/small/kk/ARTI/ARTI type=isis xml_codepage = ISO8859-2 - xml=Èlanak + xml=Èlanak diff --git a/all2xml.pl b/all2xml.pl index ddb64be..66fb8aa 100755 --- a/all2xml.pl +++ b/all2xml.pl @@ -78,7 +78,7 @@ sub isis2xml { my $swish_data = ""; my $display_data = ""; - my $line_delimiter = ""; + my $line_delimiter; my ($swish,$display); @@ -103,13 +103,13 @@ sub isis2xml { ($s,$d,$i) = (0,0,1) if (lc($x->{type}) eq "index"); #print STDERR "## s: $s d: $d i: $i ## $format ##\n"; - if ($x->{append}) { + # what will separate last line from this one? + if ($display_data && $x->{append} && $x->{append} eq "1") { $line_delimiter = ' '; - } else { + } elsif ($display_data) { $line_delimiter = '
'; } - $display_data .= $line_delimiter if ($display_data && $display); # init vars so that we go into while... ($swish,$display) = (1,1); @@ -138,6 +138,10 @@ sub isis2xml { # type="display" ; field for display if ($d && $display) { + if ($line_delimiter && $display_data) { + $display_data .= $line_delimiter; + undef $line_delimiter; + } if ($filter) { no strict 'refs'; $display_data .= join($delimiter,&$filter($display)); @@ -169,10 +173,7 @@ sub isis2xml { #print STDERR "s_d: $swish_data\nd_d: $display_data\n" if ($swish_data); if ($display_data) { - # remove last
- $display_data =~ s/$line_delimiter$//; - - $display_data = $isis_codepage->convert($display_data) || die "Can't convert '$display_data' !"; +# $display_data = $isis_codepage->convert($display_data) || die "Can't convert '$display_data' !"; # FIX: this is removed and replaced by html tag. #$xml .= xmlify($field."_display", $display_data); @@ -193,7 +194,6 @@ sub isis2xml { } if ($field_name) { $html .= $xml_codepage->convert($field_name); -# $html .= "-->".$field_name."<--"; } $html .= $display_data."###\n"; } @@ -274,6 +274,7 @@ foreach my $database ($cfg->Sections) { if (my $xml = isis2xml($row,$add_xml)) { #print STDERR "--ret-->$xml\n"; + use bytes; # as opposed to chars print "Path-Name: $path#".int($row->{mfn})."\n"; print "Content-Length: ".(length($xml)+1)."\n"; print "Document-Type: XML\n\n$xml\n"; diff --git a/import_xml/isis.xml b/import_xml/isis.xml index af1dc5f..cbff300 100644 --- a/import_xml/isis.xml +++ b/import_xml/isis.xml @@ -98,9 +98,9 @@ 300 - 320 - 327 - 329 + 320 + 327 + 329 300 320 327 @@ -108,7 +108,7 @@ - 610 + 610 610 @@ -141,15 +141,17 @@ 990 + 990 991 + 991 - + - + diff --git a/template_html/search.html b/template_html/search.html index 35fbe19..eb26569 100644 --- a/template_html/search.html +++ b/template_html/search.html @@ -132,17 +132,17 @@ Vrsta graðe: - + Knjige - + Èasopisi - + On-line èasopisi - + Èlanci i poglavlja
- + Gramofonske ploèe - + CD-ROM