Your message dated Sun, 13 Dec 2015 23:17:08 +0000 with message-id <[email protected]> and subject line Bug#799086: fixed in libencode-perl 2.63-1+deb8u1 has caused the Debian Bug report #799086, regarding Encode::Unicode decode() dies unnecessarily to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 799086: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799086 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: perl Version: 5.20.2-2 The Encode::Unicode documentation states the following: 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. To reproduce: --- use Encode qw/decode/; decode("utf-16be", "Hello World"); # does not die decode("utf-16le", "Hello World"); # does not die decode("utf-16", "\xFE\xFFHello World"); # does not die decode("utf-16", "Hello World"); # dies with "UTF-16:Unrecognised BOM" --- 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. RFC2781: 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 being big-endian. There is a simple fix of doing nothing: diff --git a/cpan/Encode/Unicode/Unicode.xs b/cpan/Encode/Unicode/Unicode.xs index cf42ab8..7caf1c1 100644 --- a/cpan/Encode/Unicode/Unicode.xs +++ b/cpan/Encode/Unicode/Unicode.xs @@ -164,9 +164,18 @@ CODE: 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. + */ } } #if 1 CPAN bug report: https://rt.cpan.org/Ticket/Display.html?id=107043
--- End Message ---
--- Begin Message ---Source: libencode-perl Source-Version: 2.63-1+deb8u1 We believe that the bug you reported is fixed in the latest version of libencode-perl, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. gregor herrmann <[email protected]> (supplier of updated libencode-perl package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Sun, 13 Dec 2015 18:10:42 +0100 Source: libencode-perl Binary: libencode-perl Architecture: source amd64 Version: 2.63-1+deb8u1 Distribution: jessie Urgency: medium Maintainer: Debian Perl Group <[email protected]> Changed-By: gregor herrmann <[email protected]> Description: libencode-perl - module providing interfaces between Perl's strings and the system Closes: 799086 Changes: libencode-perl (2.63-1+deb8u1) jessie; 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) Checksums-Sha1: 2c4963c0dcc68fa3ac0a21faeb01c080c2978bbe 2363 libencode-perl_2.63-1+deb8u1.dsc bfe4edaff8621a7ff6b31fe933ba35d290c19fdf 5888 libencode-perl_2.63-1+deb8u1.debian.tar.xz e318a591b8d74c838a4d7514d6416a6585b9adcb 1408896 libencode-perl_2.63-1+deb8u1_amd64.deb Checksums-Sha256: 0d72785128f3d649745c305ab9e631e3b131ad10dbfa3937cd76a8b0d6228cfa 2363 libencode-perl_2.63-1+deb8u1.dsc f1235d8b8da5252cbbec3a8ac49f57b31828a9124bbde9264428706d0ec459b3 5888 libencode-perl_2.63-1+deb8u1.debian.tar.xz 0b05e7397181bd10f90f0dca41495554719df92f45dd380122ee12dbe7bfd830 1408896 libencode-perl_2.63-1+deb8u1_amd64.deb Files: 529f2f32e0cc710f0f559d6e3995f344 2363 perl extra libencode-perl_2.63-1+deb8u1.dsc 5509f09d62c0ab6b4a3d06b24a7f9213 5888 perl extra libencode-perl_2.63-1+deb8u1.debian.tar.xz 4ef49b33634c41bf34e21bad810cd682 1408896 perl extra libencode-perl_2.63-1+deb8u1_amd64.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJWbadwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREMUUxMzE2RTkzQTc2MEE4MTA0RDg1RkFC QjNBNjgwMTg2NDlBQTA2AAoJELs6aAGGSaoGsCYP/RBs1vUE8tCOI45dlAp58B6R e1mrH21gmSBekwu1K7syHBPme4chnS9hDhHPNlJyAF+86Hlan0VwgC1xhx7inkSu wsyzeOXODgDrxssLvBbhrcf3t9L3rZSuitTkMTDznWOJrqNrHb4w+Bp4Tum9zLcK xMi9vpw51eh9C2y4tIXMA3UwEln/KQnKEO/bzdrAbBHFphD4CY26JaQutA/wRpom Qqx+5ha2R8HBrStdqWRLIyW8lzIWBLrY9nhQ76jV6Sc50tFCMTSc5EvEiSFEvnLN tCdkRchhJaHDAY72nLtvvPoAjOEefk+QnnGCdraSyzBml+++tTwLpC2MmulbPKbP A60atMOfHyQUokuj6KKmOKxg7TbNNa6E6wSVA9Hpt3zQNvCVxDtx2rhS40cPyKZe GCblLXIa8SXeG/+xMJpRxDUysXA3dAEPzvEsR5gICISCnf6R9XOCVAr6ZnUqcXTS oguZz7MXCbQDgHIImm1Z9ihblnf+q1nFtY0JUhLlxqHKwu7IYpGN+WbS8x/9pV/L txbFfvtWH+n4WTMsWDDf/6c2WWwTLAFitXH88HsDkfgG7svucU2mmT5M1snIYkQ8 gVre/4C0m5U2J8SJG+toMmiOyPePGMhwajnv9IUvDwUuZvW0abQYffbNQnD2BnXZ 0CzkH4F9dmLteokAC+re =Dgdz -----END PGP SIGNATURE-----
--- End Message ---

