Package: dpkg
Version: 1.15.8.4
Severity: normal
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu maverick

dpkg-genchanges truncates the Description field to 65 bytes rather than
65 characters.  When given a package with a Description field in UTF-8
and containing non-ASCII characters, this means that it can produce
invalid UTF-8 due to truncating in the middle of a character.  For a
real-world example, see:

  
http://launchpadlibrarian.net/51958054/language-pack-kde-nb-base_10.04%2B20100714_source.changes

A fix for this is to insert:

  binmode($fh, ":encoding(UTF-8)");

... just before the call to $self->parse in
Dpkg::Interface::Storable::load(); this causes Perl to assume character
semantics on the data read from that file, which causes sprintf %.65s to
yield 65 characters rather than 65 bytes.  However, this will require
every file read through that interface to be valid UTF-8, and I don't
know whether that is appropriate, so I leave this to your judgement.

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]




-- 
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to