--- /usr/local/lib/perl5/site_perl/5.8.6/Spreadsheet/ParseExcel/FmtDefault.pm 2002-07-12 08:04:58.000000000 -0700 +++ lib/Spreadsheet/ParseExcel/FmtDefault.pm 2006-08-01 07:38:38.000000000 -0700 @@ -7,8 +7,10 @@ use strict; use Spreadsheet::ParseExcel::Utility qw(ExcelFmt); use vars qw($VERSION @ISA); +use Carp; + @ISA = qw(Exporter); -$VERSION = '0.05'; # +$VERSION = '0.05_01'; # my %hFmtDefault = ( 0x00 => '@', @@ -65,7 +67,13 @@ sub TextFmt($$;$) { my($oThis, $sTxt, $sCode) =@_; return $sTxt if((! defined($sCode)) || ($sCode eq '_native_')); - return pack('C*', unpack('n*', $sTxt)); + my @chars = unpack('n*', $sTxt); + if ($] < 5.006) { + if (my @wide = grep {$_ > 256} @chars) { + carp ("Unicode characters with value(s) @wide truncated"); + } + } + return join '', map {chr $_} @chars; } #------------------------------------------------------------------------------ # FmtStringDef (for Spreadsheet::ParseExcel::FmtDefault)