/[webpac]/trunk/parse_format.pm
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 /trunk/parse_format.pm

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

revision 381 by dpavlin, Wed Jul 7 17:34:42 2004 UTC revision 488 by dpavlin, Wed Sep 29 17:22:24 2004 UTC
# Line 56  sub parse_iso_format { Line 56  sub parse_iso_format {
56                  my $f = $format;                  my $f = $format;
57    
58                  my $eval;                  my $eval;
59                  $eval = $1 if ($f =~ s/^eval{([^}]+)}//);                  $eval = $1 if ($f =~ s/^eval{([^}]+?)}//);
60    
61                  if ($f =~ s/^([^\d]+)//) {                  if ($f =~ s/^([^\d]+)//) {
62                          if ($f) {       # there is more to parse                          if ($f) {       # there is more to parse
# Line 194  sub parse_excel_format { Line 194  sub parse_excel_format {
194          my $format = shift;          my $format = shift;
195          my $row = shift;          my $row = shift;
196          my $i = shift;          my $i = shift;
197          my $codepage = shift;          #my $codepage = shift;
198            #
199            # data allready comes in utf-8 due to change in
200            # SpreadSheet::ParseExcel::FmtDefault line 69 from
201            #       return pack('C*', unpack('n*', $sTxt));
202            # to following which returns utf-8:
203            #       return pack('U*', unpack('n*', $sTxt));
204            #
205    
206          return if ($i > 0);     # Excel doesn't support repeatable fields          return if ($i > 0);     # Excel doesn't support repeatable fields
207    
# Line 215  sub parse_excel_format { Line 222  sub parse_excel_format {
222  #print STDERR "--$1-> $format -[",length($format),"] ";  #print STDERR "--$1-> $format -[",length($format),"] ";
223                          if ($row->{$1}) {                          if ($row->{$1}) {
224                                  my $tmp = $row->{$1};                                  my $tmp = $row->{$1};
                                 if ($codepage) {  
                                         $tmp = $codepage->convert($tmp) || warn "excel: $1 '$tmp' can't convert";  
                                 }  
225                                  $display .= $prefix . $tmp;                                  $display .= $prefix . $tmp;
226                                  $swish .= $tmp." ";                                  $swish .= $tmp." ";
227  #print STDERR " == $tmp";  #print STDERR " == $tmp";

Legend:
Removed from v.381  
changed lines
  Added in v.488

  ViewVC Help
Powered by ViewVC 1.1.26