/[webpac]/branches/ffzg/all2xml.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/ffzg/all2xml.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 321 by dpavlin, Sun Apr 18 01:03:27 2004 UTC revision 489 by dpavlin, Wed Sep 29 18:56:26 2004 UTC
# Line 637  foreach my $database ($cfg->Sections) { Line 637  foreach my $database ($cfg->Sections) {
637          my $lookup_file = $cfg -> val($database, 'lookup_newfile'); # optional          my $lookup_file = $cfg -> val($database, 'lookup_newfile'); # optional
638          if ($lookup_file) {          if ($lookup_file) {
639                  #tie %lhash, 'GDBM_File', $lookup_file, &GDBM_NEWDB, 0644;                  #tie %lhash, 'GDBM_File', $lookup_file, &GDBM_NEWDB, 0644;
640                    if (! -e $lookup_file) {
641                            open(LOOKUP, "> $lookup_file") || die "can't create $lookup_file': $!";
642                            close(LOOKUP);
643                    }
644                  tie %lhash, 'TDB_File', $lookup_file, TDB_CLEAR_IF_FIRST, O_RDWR, 0644;                  tie %lhash, 'TDB_File', $lookup_file, TDB_CLEAR_IF_FIRST, O_RDWR, 0644;
645                  print STDERR "creating lookup file '$lookup_file'\n";                  print STDERR "creating lookup file '$lookup_file'\n";
646                  # delete memory cache for lookup file                  # delete memory cache for lookup file
# Line 807  print STDERR "using: $type...\n"; Line 811  print STDERR "using: $type...\n";
811                          for(my $iC = $oWorksheet->{MinCol} ; defined $oWorksheet->{MaxCol} && $iC <= $oWorksheet->{MaxCol} ; $iC++) {                          for(my $iC = $oWorksheet->{MinCol} ; defined $oWorksheet->{MaxCol} && $iC <= $oWorksheet->{MaxCol} ; $iC++) {
812                                  my $cell = $oWorksheet->{Cells}[$iR][$iC];                                  my $cell = $oWorksheet->{Cells}[$iR][$iC];
813                                  if ($cell) {                                  if ($cell) {
814                                          $row->{int2col($iC)} = $cell->Value;                                          # this conversion is a cludge.
815                                            # Files from Excell could have
816                                            # characters which don't fit into
817                                            # destination encoding.
818                                            $row->{int2col($iC)} = $utf2cp->convert($cell->Value) || $cell->Value;
819                                  }                                  }
820                          }                          }
821    

Legend:
Removed from v.321  
changed lines
  Added in v.489

  ViewVC Help
Powered by ViewVC 1.1.26