bugMHonArc - Bugs: bug #26577, Changed semantic for unpack breaks...


You are not allowed to post comments on this tracker with your current authentication level.

bug #26577: Changed semantic for unpack breaks UTF-8

Submitted by:  Alexander Wirt <formorer>
Submitted on:  Thu 14 May 2009 12:38:50 PM UTC  
Category:  Mail Parsing Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Behavior
Status:  Fixed Privacy:  Public
Assigned to:  Earl Hood <ehood> Open/Closed:  Closed
Operating System:  All Perl Version:  5.10
Component Version:  2.6.16 Fixed Release:  2.6.17

Fri 31 Dec 2010 06:24:43 PM UTC, comment #2: 

Conditional check for Perl 5.10 added, so unpack is
called differently if Perl 5.10, or later is called,
but previous unpack call is still used for older
versions of Perl.

Earl Hood <ehood>
Project AdministratorIn charge of this item.
Thu 14 May 2009 04:10:08 PM UTC, comment #1: 

Are you able to test the code change with earlier
versions of Perl?

If the change works for older versions, there will
be no need to conditionalize based upon version
of Perl.

Earl Hood <ehood>
Project AdministratorIn charge of this item.
Thu 14 May 2009 12:38:50 PM UTC, original submission:  


with perl 5.10 the semantic of unpacks U0 parameter changed from a charbased to a bytebased version [1]. That means that _utf8_to_sgml from CharEnt.pm fails for multibyte characters. The fix is pretty simple:

-$char = unpack('U0U*',$1);
+$char = unpack('C0U*',$1);

Of course this took me some time to findī€€out ;). You should around it with a perl version check, but I guess that should be no Problem.


Alex - Debian listmaster

[1] http://search.cpan.org/dist/perl-5.10.0/pod/perl5100delta.pod#Packing_and_UTF-8_strings

Alexander Wirt <formorer>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ehood (Posted a comment)
  • -email is unavailable- added by formorer (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-09 ehood Open/ClosedOpen => Closed
    2011-01-09 ehood StatusReady For Test => Fixed
        Fixed Release => 2.6.17
    2010-12-31 ehood StatusIn Progress => Ready For Test
        Assigned toNone => ehood
        Operating SystemLinux => All
    2010-12-30 ehood StatusNone => In Progress

    Back to the top

    Powered by Savane 3.5