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 ParsingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Behavior
Status: FixedPrivacy: Public
Assigned to: Earl Hood <ehood>Open/Closed: Closed
Operating System: AllPerl Version: 5.10
Component Version: 2.6.16Fixed 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:

Hi,

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.

Thanks

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
  • -unavailable- added by ehood (Posted a comment)
  • -unavailable- added by formorer (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 09 Jan 2011 09:22:27 AM UTCehoodOpen/ClosedOpen=>Closed
    Sun 09 Jan 2011 08:35:20 AM UTCehoodStatusReady For Test=>Fixed
      Fixed Release=>2.6.17
    Fri 31 Dec 2010 06:24:43 PM UTCehoodStatusIn Progress=>Ready For Test
      Assigned toNone=>ehood
      Operating SystemLinux=>All
    Thu 30 Dec 2010 08:14:03 PM UTCehoodStatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1