--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: jessie-pu: package libencode-perl/2.63-1+deb8u1
- From: gregor herrmann <gregoa@debian.org>
- Date: Sun, 13 Dec 2015 16:39:51 +0100
- Message-id: <145002119129.19390.14476985530223805003.reportbug@jadzia.comodo.priv.at>
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I'd like to upload libencode-perl to s-p-u to fix #799086 (cf. also
#798727 for the perl core variant).
The patch is taken from upstream's 2.77 release and changes the
behaviour of decode() in the absence of a BOM: previously it died,
now it assumes BE accordingly to RFC2781 and the Unicode Standard
version 8.0.
Full debdiff attached.
Thanks in advance,
gregor
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQJ8BAEBCgBmBQJWbZFHXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMUUxMzE2RTkzQTc2MEE4MTA0RDg1RkFC
QjNBNjgwMTg2NDlBQTA2AAoJELs6aAGGSaoGC+8QAJ8SUzYcTZ/5t4z4MTsl81bn
VdPjtlW1VqILmbdbfKOVuzyFVx0IidFyCNwaxkca2ncCiwSZbdhA5m/A92TPhKe5
6hcRVCcuWmnIj4xxAfdsATPwUGqPtoe5BWze89S9AYd118rW2vLgFqgbXTn4+zd+
PYVTG3IJjik68wZcpMHi979PEPUkG1lIlJdWrp10YdriaD1H9NDqC8YUQJXVgRIq
jdrTvy1WiV940V1O2q61XdKMoLq/zvtkpTm5Ic5k5jeHSN6gEtfywnuqJrk/86i/
BO49YHwMhNO+vwDWHS6EOEa5EB5lDc29UdXU+yxtqjTE77mZVssJR9VDnCTerluw
K73ju3b095h1ABG3Gd8yYhVWvdQ/DQH//0VMwEFmfEwJsZSqyn+iv1Fw+WlmCYeC
8Qua1tvvOiA7NyLkt35oCjgm1FzOKzK7NL0UoIf07aBHOz/3xuNeR1YaWeKWu2JE
hXK13tluoTO5Xee0VF2tLBcxdvIJpzY4WmmRayXJZax0Tusg1Y5dnVDpdIohnlja
PzselS885sfITliBW7e0LT+ViIqVpJmR4YKF48A86lQ2tiodD5HmuU/jm5CLhK0u
OIc516T3EecP8iEzifuE7b6iwBUXa50vX7blic3/mxs06Boa8HkPSw5wtePJfbrQ
qpUAj2rgD+T4u1clVgXj
=p8zm
-----END PGP SIGNATURE-----
diff -Nru libencode-perl-2.63/debian/changelog libencode-perl-2.63/debian/changelog
--- libencode-perl-2.63/debian/changelog 2014-10-20 20:21:35.000000000 +0200
+++ libencode-perl-2.63/debian/changelog 2015-12-13 16:31:13.000000000 +0100
@@ -1,3 +1,13 @@
+libencode-perl (2.63-1+deb8u1) UNRELEASED; urgency=medium
+
+ * Add patch dont-die-without-bom.patch.
+ The decode() routine died when no BOM was found. This patch, backported
+ from upstream's 2.77 release, changes the behaviour to fall back to BE
+ according to RFC2781 and the Unicode Standard version 8.0.
+ (Closes: #799086)
+
+ -- gregor herrmann <gregoa@debian.org> Sun, 13 Dec 2015 16:30:29 +0100
+
libencode-perl (2.63-1) unstable; urgency=medium
[ Salvatore Bonaccorso ]
diff -Nru libencode-perl-2.63/debian/patches/dont-die-without-bom.patch libencode-perl-2.63/debian/patches/dont-die-without-bom.patch
--- libencode-perl-2.63/debian/patches/dont-die-without-bom.patch 1970-01-01 01:00:00.000000000 +0100
+++ libencode-perl-2.63/debian/patches/dont-die-without-bom.patch 2015-12-13 16:31:13.000000000 +0100
@@ -0,0 +1,56 @@
+From 27682d02f7ac0669043faeb419dd5a104eecfb73 Mon Sep 17 00:00:00 2001
+From: Dan Kogai <dankogai+github@gmail.com>
+Date: Tue, 15 Sep 2015 22:49:12 +0900
+Subject: [PATCH] Address https://rt.cpan.org/Public/Bug/Display.html?id=107043
+
+ ! Unicode/Unicode.xs Unicode/Unicode.pm
+ Address RT#107043: If no BOM is found, the routine dies.
+ When you decode from UTF-(16|32) without -BE or LE without BOM,
+ Encode now assumes BE accordingly to RFC2781 and the Unicode
+ Standard version 8.0
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=107043
+Bug-Debian: https://bugs.debian.org/799086
+
+--- a/Unicode/Unicode.pm
++++ b/Unicode/Unicode.pm
+@@ -176,7 +176,13 @@
+
+ When BE or LE is omitted during decode(), it checks if BOM is at the
+ beginning of the string; if one is found, the endianness is set to
+-what the BOM says. If no BOM is found, the routine dies.
++what the BOM says.
++
++=item Default Byte Order
++
++When no BOM is found, Encode 2.76 and below croaked. Since Encode
++2.77 (and 2.63-1+deb8u1), it falls back to BE accordingly to RFC2781 and the Unicode
++Standard version 8.0
+
+ =item *
+
+--- a/Unicode/Unicode.xs
++++ b/Unicode/Unicode.xs
+@@ -164,9 +164,19 @@
+ endian = 'V';
+ }
+ else {
+- croak("%"SVf":Unrecognised BOM %"UVxf,
+- *hv_fetch((HV *)SvRV(obj),"Name",4,0),
+- bom);
++ /* No BOM found, use big-endian fallback as specified in
++ * RFC2781 and the Unicode Standard version 8.0:
++ *
++ * The UTF-16 encoding scheme may or may not begin with
++ * a BOM. However, when there is no BOM, and in the
++ * absence of a higher-level protocol, the byte order
++ * of the UTF-16 encoding scheme is big-endian.
++ *
++ * If the first two octets of the text is not 0xFE
++ * followed by 0xFF, and is not 0xFF followed by 0xFE,
++ * then the text SHOULD be interpreted as big-endian.
++ */
++ s -= size;
+ }
+ }
+ #if 1
diff -Nru libencode-perl-2.63/debian/patches/series libencode-perl-2.63/debian/patches/series
--- libencode-perl-2.63/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ libencode-perl-2.63/debian/patches/series 2015-12-13 16:31:13.000000000 +0100
@@ -0,0 +1 @@
+dont-die-without-bom.patch
--- End Message ---