Bug#495790: libspreadsheet-parseexcel-perl: Character in 'c' format wrapped in pack in perl 5.10

Jörgen Hägg jorgen.hagg at axis.com
Wed Aug 20 12:46:08 UTC 2008


Package: libspreadsheet-parseexcel-perl
Version: 0.3200-2
Severity: normal


I got some irritating warnings from Spreadsheet::ParseExcel.pm:

Character in 'c' format wrapped in pack at /usr/share/perl5/Spreadsheet/ParseExcel.pm line 1792.
Character in 'c' format wrapped in pack at /usr/share/perl5/Spreadsheet/ParseExcel.pm line 1796.


After searching the web I found one suggestion to change 'c' to 'U',
after all, I'm using unicode strings.
That change silenced it.

Don't know if this will have any bad effects on other strings.


--- /tmp/ParseExcel.pm	2008-08-20 14:44:25.000000000 +0200
+++ /usr/share/perl5/Spreadsheet/ParseExcel.pm	2008-08-20 14:44:34.000000000 +0200
@@ -1789,11 +1789,11 @@
         # http://rt.cpan.org/Ticket/Display.html?id=18063
         my $u31 = unpack("c",substr($sWk, 3, 1)) & 0xFC;
         $u31 |= 0xFFFFFF00 if ($u31 & 0x80); # raise neg bits for neg 1-byte value
-        substr($sWk, 3, 1) &= pack('c', $u31);
+        substr($sWk, 3, 1) &= pack('U', $u31);
 
         my $u01 = unpack("c",substr($lWk, 0, 1)) & 0xFC;
         $u01 |= 0xFFFFFF00 if ($u01 & 0x80); # raise neg bits for neg 1-byte value
-        substr($lWk, 0, 1) &= pack('c', $u01);
+        substr($lWk, 0, 1) &= pack('U', $u01);
 
         return ($iF, unpack("d", ($BIGENDIAN)? $sWk . "\0\0\0\0": "\0\0\0\0". $lWk)/ 100);
     }


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libspreadsheet-parseexcel-perl depends on:
ii  libjcode-pm-perl             2.06-1      Perl extension interface to conver
ii  libole-storage-lite-perl     0.17-1      simple class for OLE document inte
ii  libspreadsheet-writeexcel-pe 2.23-1      create Excel spreadsheets
ii  libunicode-map-perl          0.112-10+b1 Perl module for mapping charsets f
ii  perl                         5.10.0-13   Larry Wall's Practical Extraction 

libspreadsheet-parseexcel-perl recommends no packages.

libspreadsheet-parseexcel-perl suggests no packages.

-- no debconf information





More information about the pkg-perl-maintainers mailing list