Skip Menu |
 

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 121545
Status: open
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: jeroen.vanwolffelaar [...] booking.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



X-Ah-From: jeroen.vanwolffelaar [...] booking.com
MIME-Version: 1.0
X-Spam-Status: No, score=-1.998 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, SPF_FAIL=0.001] autolearn=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
Content-Type: multipart/alternative; boundary="94eb2c0df0ec9461c3054edda8ae"
Message-ID: <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com>
X-Received: by 10.223.149.68 with SMTP id 62mr30706849wrs.7.1494088806759; Sat, 06 May 2017 09:40:06 -0700 (PDT)
X-Received: by 10.223.149.68 with SMTP id 62mr30706842wrs.7.1494088806583; Sat, 06 May 2017 09:40:06 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Ah-Spam-Helo: mail-wm0-f71.google.com
X-Spam-Score: -1.998
X-Verified-External: Yes
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 77F03240212 for <cpan-bug+IO-Compress [...] hipster.bestpractical.com>; Sat, 6 May 2017 12:56:17 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HmMbroK0fRn2 for <cpan-bug+IO-Compress [...] hipster.bestpractical.com>; Sat, 6 May 2017 12:56:16 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id DE513240061 for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 12:56:15 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 38B9311D8AA for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 09:56:14 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 2C7FD11F07A for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 09:56:10 -0700 (PDT)
Received: from mail-out7.booking.com (mail-out7.booking.com [5.57.20.191]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id DF87511D8AA for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 09:56:08 -0700 (PDT)
Received: from mqueue-201.lhr4.prod.booking.com ([10.182.5.7]:50642) by mtx-203.lhr4.prod.booking.com with esmtp (Exim 4.86) (envelope-from <jeroen.vanwolffelaar [...] booking.com>) id 1d72kZ-0005YF-NW for bug-IO-Compress [...] rt.cpan.org; Sat, 06 May 2017 18:40:07 +0200
Received: from exscan-101.ams4.prod.booking.com (exscan-101.ams4.prod.booking.com [10.192.5.20]) by mqueue-201.lhr4.prod.booking.com (Postfix) with ESMTP id A76EFAB for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 18:40:07 +0200 (CEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by exscan-101.ams4.prod.booking.com (Postfix) with SMTP id 3wKvd34yyHz1Jc6M for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 18:40:07 +0200 (CEST)
Received: from mx9.booking.com (mrx-110.ams4.prod.booking.com [10.192.6.195]) by exscan-101.ams4.prod.booking.com (Postfix) with ESMTPS id 3wKvd34XGhz1Jc67 for <bug-IO-Compress [...] rt.cpan.org>; Sat, 6 May 2017 18:40:07 +0200 (CEST)
Received: from mail-wm0-f71.google.com ([74.125.82.71]:40642) by mrx-110.ams4.prod.booking.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86) (envelope-from <jeroen.vanwolffelaar [...] booking.com>) id 1d72kZ-0006qX-77 for bug-IO-Compress [...] rt.cpan.org; Sat, 06 May 2017 18:40:07 +0200
Received: by mail-wm0-f71.google.com with SMTP id h65so3341056wmd.7 for <bug-IO-Compress [...] rt.cpan.org>; Sat, 06 May 2017 09:40:07 -0700 (PDT)
Received: by 10.223.142.56 with HTTP; Sat, 6 May 2017 09:39:26 -0700 (PDT)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] booking.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] booking-com.20150623.gappssmtp.com
Delivered-To: cpan-bug+IO-Compress [...] hipster.bestpractical.com
Subject: IO::Uncompress::Gunzip silently does not process utf8 strings
Return-Path: <jeroen.vanwolffelaar [...] booking.com>
X-RT-Mail-Extension: io-compress
X-Original-To: cpan-bug+IO-Compress [...] hipster.bestpractical.com
Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=booking.com ; s=bk; h=Content-Type:To:Subject:Message-ID:Date:From:MIME-Version; bh=sd7FuA54JDPzTHeax0hPTq4iih8KBZdUwA1G4piYL7I=; b=ZPDarcMnWI3Gz4quhJKhbZIASe WI5uSDsjcPf5rarjxv8gUbhHSc/nknCPX4uGJ+ocfsX7zzSAJUyZA85UwLQBSpxNS5NFRNXd7EJQQ Cl0uvQEOHXMTbbvILC2yr1LihfmkgbK0/71jyjhy9MBnisg0KSiSFCgbvnUlmSvLQWlM=;
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=booking-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=sd7FuA54JDPzTHeax0hPTq4iih8KBZdUwA1G4piYL7I=; b=mi+Ww6ex765Rfa/ba3qxzbFbSyOD+13ZZSylKiw/rwo0uENDtP3ajg3M6YQCs5vG6D eqvRkZXghoYtWzppmgD6LCnE/3JZeumUpJP8R1EEOnihQifUFfoELGfh7d6bDeaPxnpK HR+G/HN4QkqpOEBG6NHJBcqg/viBvkEXYwxSbTT0/b1eIx/1ZFizOmaKh6q+vIkqSVE/ k2ZmyvERrzBqaU660DD1N2cnEflezmDUmD9BSNoj6lXHhUqY9jkQoJqOgyydpF5Qolo/ 84ZjZxclQc5US2TYEcQ+1Hqp4UMKSWK66weEQ4rGmiCconiivWRpsJwEqRUerD3y+7H8 x8hQ==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=sd7FuA54JDPzTHeax0hPTq4iih8KBZdUwA1G4piYL7I=; b=aKJ0Tu+cDWJXJ4O/lMxiB7lDPuhybCi529hz+b8/S5+VjfWG7pEm5St+zn/kqpbYf9 tVxqMEHMbBiHv1iie+vs4Z124UsMvpYGglnOeAA1UAkYsQZNKI8q/hMo88rnrw6axEm7 NqHb5iAOz5JCfmncl+9tu+H6ulVlkg98MzzVh253Dfm/VRfk3cqj86lRlb6KMtWpDrJ6 mwGKazY1X8zvO0t9WKqqqnyxyV1r98pks9EdC+iVh6LhrQ+0dhzWbuf0yGex3Q1NndYT 6XdZPxzNpJKIKI47Pfv3SZMUsp57t1DmH1zd7EVEuySowmYvLfQ5YPC6f2uKsFlg3iFt rovw==
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_NO_HTTP 0.1, FORGERY_TARGET 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTH_SIZE_3000_MORE 0, BODYTEXTP_SIZE_3000_LESS 0, CTYPE_MULTIPART_NO_QUOTE 0, DKIM_SIGNATURE 0, FROM_NAME_PHRASE 0, HEX28_LC_NOT_GOOGLE 0, NO_URI_HTTPS 0, SPF_PASS 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HELO_SHIPPING 0, __HEX28_LC_BOUNDARY 0, __HTML_AHREF_TAG 0, __HTML_TAG_DIV 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __RCVD_SHIPPING 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __URI_WITHOUT_PATH 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_ERROR , __zen.spamhaus.org_ERROR '
Date: Sat, 6 May 2017 18:39:26 +0200
X-Spam-Level:
X-Greylist: delayed 938 seconds by postgrey-1.34 at xx1.develooper.com; Sat, 06 May 2017 09:56:08 PDT
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2017.5.6.165115
X-Ah-RCPT: bug-IO-Compress [...] rt.cpan.org
X-Fireeye: Clean
To: bug-IO-Compress [...] rt.cpan.org
From: Jeroen van Wolffelaar <jeroen.vanwolffelaar [...] booking.com>
X-GM-Message-State: AN3rC/6Soxs+cO3g1vA8/Sch5nQms8Bx9Z536tgjv3PQsK6MI2yF8sN+ P+qF3FoyAjsRS0WDQG+oeNmg4en1zBtdJ8YJusxVkC7LLC3jTYmkuwWaWXw82cJ+ziBpYIpnkn8 s0STFR1CjLm87S9pKU4WGzJ9Wil+t
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 2637
Download (untitled) / with headers
text/plain 2.5k
This is a bug report for perl from jeroen.vanwolffelaar@booking.com, generated with the help of perlbug 1.39 running under perl 5.18.2. ----------------------------------------------------------------- Calling my $text = "This is the raw text"; gzip \$text, \my $gz or die; my $utf8gz = $gz; utf8::upgrade($utf8gz); gunzip \$utf8gz => $filename|\$uncompressed_data; succeeds (returns 1), while stuffing the input data into file $filename/variable $uncompressed_data, not decompressing anything. It should either decompress the string (even though it's wasteful/silly that it is utf8), or return an error. Considering that File::Slurp::write_file just stuffs the (utf8) data without complaining as bytes to a file, I'd expect gunzip to treat such utf8 variable exactly the same way and with the same interpretation. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=medium module=IO::Uncompress::Gunzip --- Site configuration information for perl 5.18.2: Configured by root at Mon Feb 20 16:49:45 CET 2017. Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=linux, osvers=, archname=x86_64-linux uname='linux gnulinux ' config_args='' Compiler: cc='gcc', ccflags ='', optimize='-O2', cppflags='' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags ='' libpth=/usr/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl' cccdlflags='-fPIC', lddlflags='-shared -O2 -fstack-protector' Locally applied patches: --- @INC for perl 5.18.2: lib --- Environment for perl 5.18.2: HOME=/home/jvanwolffela LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/jvanwolffela/perl5/bin PERL5LIB=lib PERL_BADLANG (unset) PERL_LOCAL_LIB_ROOT=/home/jvanwolffela/perl5:/home/jvanwolffela/perl5 PERL_MB_OPT=--install_base "/home/jvanwolffela/perl5" PERL_MM_OPT=INSTALL_BASE=/home/jvanwolffela/perl5 SHELL=/bin/bash --Jeroen
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 4181
MIME-Version: 1.0
In-Reply-To: <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-23177-1494342389-62.121545-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 804
Download (untitled) / with headers
text/plain 804b
Hey Jeroen, thanks for the feedback. I'm not clear what you expect to happen by running utf8::upgrade on binary data. Flagging it as UTF8 doesn't make sense. my $text = "This is the raw text"; gzip \$text, \my $gz or die; my $utf8gz = $gz; utf8::upgrade($utf8gz); Please shout if I'm missing something about what your are trying to do. Also, your point about File::Slurp::write_file just working without complaining is not what I saw when I tried it $ perl -MFile::Slurp -e 'write_file("/tmp/abc", "\x{20ac}\n")' Wide character in syswrite at /usr/local/share/perl5/File/Slurp.pm line 506. To actually get the file written, I had to explicitly tell File::Slurp that it was writing utf8, like this $ perl -MFile::Slurp -e 'write_file("/tmp/abc", {binmode => ":utf8"}, "\x{20ac}\n")' cheers Paul
MIME-Version: 1.0
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Content-Type: multipart/alternative; boundary="001a114b39a2452acd054f1f3f93"
X-Ah-Spam-Helo: mail-wr0-f198.google.com
X-Spam-Score: -5.999
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] booking.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] booking-com.20150623.gappssmtp.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 746D524025D for <cpan-bug+IO-Compress [...] hipster.bestpractical.com>; Tue, 9 May 2017 18:55:37 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 70vl5wxN4CM2 for <cpan-bug+IO-Compress [...] hipster.bestpractical.com>; Tue, 9 May 2017 18:55:34 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id CE37C240211 for <bug-IO-Compress [...] rt.cpan.org>; Tue, 9 May 2017 18:55:33 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id B6A3211FB00 for <bug-IO-Compress [...] rt.cpan.org>; Tue, 9 May 2017 15:55:32 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id A17AF11D8A0 for <bug-IO-Compress [...] rt.cpan.org>; Tue, 9 May 2017 15:55:28 -0700 (PDT)
Received: from mail-out5.booking.com (mail-out5.booking.com [5.57.20.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id AF0DA11FAF4 for <bug-IO-Compress [...] rt.cpan.org>; Tue, 9 May 2017 15:55:22 -0700 (PDT)
Received: from mqueue-201.lhr4.prod.booking.com ([10.182.5.7]:41204) by mtx-201.lhr4.prod.booking.com with esmtp (Exim 4.86) (envelope-from <jeroen.vanwolffelaar [...] booking.com>) id 1d8E2D-00044x-Am for bug-IO-Compress [...] rt.cpan.org; Wed, 10 May 2017 00:55:13 +0200
Received: from exscan-202.lhr4.lom.booking.com (exscan-202.lhr4.prod.booking.com [10.182.6.20]) by mqueue-201.lhr4.prod.booking.com (Postfix) with ESMTP id 4F0E922D for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 00:55:13 +0200 (CEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by exscan-202.lhr4.lom.booking.com (Postfix) with SMTP id 3wMvpT1hkxz441Sd for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 00:55:13 +0200 (CEST)
Received: from mx4.booking.com (mrx-212.lhr4.prod.booking.com [10.182.5.5]) by exscan-202.lhr4.lom.booking.com (Postfix) with ESMTPS id 3wMvpN6whdz441RD for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 00:55:08 +0200 (CEST)
Received: from mail-wr0-f198.google.com ([209.85.128.198]:39407) by mrx-212.lhr4.prod.booking.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86) (envelope-from <jeroen.vanwolffelaar [...] booking.com>) id 1d8E28-0005z0-JK for bug-IO-Compress [...] rt.cpan.org; Wed, 10 May 2017 00:55:08 +0200
Received: by mail-wr0-f198.google.com with SMTP id k57so3709431wrk.6 for <bug-IO-Compress [...] rt.cpan.org>; Tue, 09 May 2017 15:55:08 -0700 (PDT)
Received: by 10.223.142.56 with HTTP; Tue, 9 May 2017 15:54:27 -0700 (PDT)
Delivered-To: cpan-bug+IO-Compress [...] hipster.bestpractical.com
Subject: Re: [External] [rt.cpan.org #121545] IO::Uncompress::Gunzip silently does not process utf8 strings
Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=booking.com ; s=bk; h=Content-Type:To:Subject:Message-ID:Date:From:References:In-Reply-To :MIME-Version; bh=xFEMRh0bwKBBKkUKS8IZHA7KOc5KNVZABYQSU0ZwgN8=; b=soN2wwrkFIE OABUA4lMkeyYwdvlegK0a1XGpsbQtAmx4G3AHJDlq09M9Mr36AeeKLvgoscJJsdDL41sJ4KuAc+YK fVLPnUY05p1YfvIqZKJxSHkXjEJficv84RvaeZtzsczK5etL8eEqWsqATi33I0GU+PIFPlOJkRqfU lA6ahs=;
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=booking-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xFEMRh0bwKBBKkUKS8IZHA7KOc5KNVZABYQSU0ZwgN8=; b=KoGC1lgFRnzjFxC4oV04y36I5q+47GRgtQ761RR7xbBvmZD3Si2bmlHT4miKrqRc7G YHQXAPoX5MBKGSQB6dpSFTwAcwCaFbO75qrC9J+spi+fzK6MfMDY4TrYPFWTpl1JLax8 GPQRbkgHxRqtgMQ+2JDA23DSNIQHXKT/xn9tH5UAXacRCYUGI/aYaVuvVNEhHWIrx//B ZNDavKSF+jNJF62KWyLZ3UNDr52ItLQFfFZKhWeXvx8Vp12UAV/G4XZNCTUdGNRTYBV5 J1CmaaiRnCwGtUh2687fl2jiKhDdC+IS5xWVFFddTDnJV4fjeuQ6JajnALV/C2iJlb+i Bxzw==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xFEMRh0bwKBBKkUKS8IZHA7KOc5KNVZABYQSU0ZwgN8=; b=U46dmquOSPfyssAQZG2Z8gk1KY5gg/MgyDmGnAiMZyTn6QcNPdMje9EsOkWTQZXCQC DEmDYFnRHwtW7c+ZtWe+deoRMftphIW8sUVwN82q5GPermjkWC8O3ZrbVzcBhAE7ZjKH siB/6ulK6kUxa3z/3Fj0NDw3DUdBGlZ/YqweiHhvMmxUBxFdVO/7K41My0yC3uergo+T TSaSykLCoVnZCdfN7u1YX+5nDPydZpyh5F6bEuWscvtoGWX2vjsQi08dGFIPpEZsVLKO xJ9m+EUF6y7st2qLgLQAacy6oObTHH8ky92aqxHwTfGRwEy0fwStcN4Q65deDtRZEiMe PFwQ==
Date: Wed, 10 May 2017 00:54:27 +0200
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FORGERY_TARGET 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTH_SIZE_3000_MORE 0, CTYPE_MULTIPART_NO_QUOTE 0, DKIM_SIGNATURE 0, FROM_NAME_PHRASE 0, HEX28_LC_NOT_GOOGLE 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SPF_PASS 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FORWARDED_MSG 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HELO_SHIPPING 0, __HEX28_LC_BOUNDARY 0, __HTML_AHREF_TAG 0, __HTML_TAG_DIV 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MULTIPLE_URI_TEXT 0, __PHISH_PHRASE1_B 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __RATWARE_SIGNATURE_3_N1 0, __RCVD_SHIPPING 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_WWW 0, __URI_NS , __URI_WITHOUT_PATH 0, __URI_WITH_PATH 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-Ah-RCPT: bug-IO-Compress [...] rt.cpan.org
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2017.5.9.225116
X-Fireeye: Clean
To: bug-IO-Compress [...] rt.cpan.org
X-GM-Message-State: AODbwcC2jRECt9Y/LKer4XitzHhTjMOKwmKeFl944m2t0eXo7kkozFHf 2s6r96lsv9Whq4XCxYBmG9qxX7QkVLoLXDoC3f+CqXkPC/OBPNj51u4hNWPEmPINX4yhJjQlsiA 5sGaw+UAZlAN4f45l7jT+MOduLDgR
X-Ah-From: jeroen.vanwolffelaar [...] booking.com
In-Reply-To: <rt-4.0.18-23177-1494342389-1007.121545-6-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-5.999 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_OUR_RT=-4, HTML_MESSAGE=0.001] autolearn=ham
X-RT-Interface: API
References: <RT-Ticket-121545 [...] rt.cpan.org> <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com> <rt-4.0.18-23177-1494342389-1007.121545-6-0 [...] rt.cpan.org>
Message-ID: <CADp9wovhpsZ9=vHkmwszhd7-4H4aj_bVYM0HDuw1QwhqvGrZEQ [...] mail.gmail.com>
X-Received: by 10.28.27.197 with SMTP id b188mr1524679wmb.61.1494370507907; Tue, 09 May 2017 15:55:07 -0700 (PDT)
X-Received: by 10.28.27.197 with SMTP id b188mr1524669wmb.61.1494370507616; Tue, 09 May 2017 15:55:07 -0700 (PDT)
X-Verified-External: Yes
Return-Path: <jeroen.vanwolffelaar [...] booking.com>
X-RT-Mail-Extension: io-compress
X-Original-To: cpan-bug+IO-Compress [...] hipster.bestpractical.com
From: Jeroen van Wolffelaar <jeroen.vanwolffelaar [...] booking.com>
RT-Message-ID: <rt-4.0.18-18959-1494370539-210.121545-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 3055
Download (untitled) / with headers
text/plain 2.9k
Hi, The utf8::upgrade statement is for demonstration purposes and to have a small, self-contained reproduction scenario. Indeed it doe not make any sense at all. The real scenario was much more convoluted, involving http libraries, unrelated to the scope of this (IMHO still) bug in IO::Compress: the end result is as in my reproduction demo, that a string that is supposed to have (and indeed has) gzip binary data, is marked (inadvertently) utf8. When this string was written to a file via File::Slurp, and later picked up by gunzip's filename support, things worked swell. When I 'optimised' to not write (needlessly) to disk, things went awry and caused me a bit of debugging pain. Needless to say I expected this change to not have any change in output. My point of view is that either: - gunzip does *not* find utf8 strings acceptable input. It should then not return anything to its second argument, and return '0' itself indicating failure, perhaps emitting a warning and/or setting $!. - gunzip *does* find utf8 strings acceptable (although a look of disapproval is in order). In this case, it should actually decompress (this is the behaviour that File::Slurp::write_file() choses: write bytes to file). The current behaviour, writing the input verbatim to the output, *without* decompressing, is IMHO plain wrong behaviour, and poor error handling. /usr/bin/gzip doesn't do this, not does zlib (C or perl version), etc. As to your observation that you cannot write utf8 strings without complaints to a file using F::S::write_file: you can, as long as all characters are in the latin1 range (U+00 through U+FF). Which is the same assumption that utf8::downgrade makes: that you just want plain old latin1, however wrong that is, but at least it's probably consistent with how you got your 'utf8' marked gzipped binary data in the first place. In an ideal world, people would never automatically convert between 'array of bytes' and 'string of unicode codepoints', but that's not what perl currently does. Thanks, --Jeroen On Tue, May 9, 2017 at 5:06 PM, Paul Marquess via RT < bug-IO-Compress@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=121545 > > > Hey Jeroen, > > thanks for the feedback. > > I'm not clear what you expect to happen by running utf8::upgrade on binary > data. Flagging it as UTF8 doesn't make sense. > > my $text = "This is the raw text"; > gzip \$text, \my $gz or die; > my $utf8gz = $gz; > utf8::upgrade($utf8gz); > > Please shout if I'm missing something about what your are trying to do. > > > Also, your point about File::Slurp::write_file just working without > complaining is not what I saw when I tried it > > $ perl -MFile::Slurp -e 'write_file("/tmp/abc", "\x{20ac}\n")' > Wide character in syswrite at /usr/local/share/perl5/File/Slurp.pm line > 506. > > To actually get the file written, I had to explicitly tell File::Slurp > that it was writing utf8, like this > > $ perl -MFile::Slurp -e 'write_file("/tmp/abc", {binmode => ":utf8"}, > "\x{20ac}\n")' > > > cheers > Paul > >
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 4046
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-18959-1494370539-210.121545-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-121545 [...] rt.cpan.org> <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com> <rt-4.0.18-23177-1494342389-1007.121545-6-0 [...] rt.cpan.org> <CADp9wovhpsZ9=vHkmwszhd7-4H4aj_bVYM0HDuw1QwhqvGrZEQ [...] mail.gmail.com> <rt-4.0.18-18959-1494370539-210.121545-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4838-1494405296-1447.121545-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 422
Download (untitled) / with headers
text/plain 422b
Hey Jeroen, aaah, I see what your problem is now! Your example of how File::Slurp::write_file worked made me think your issue was with the compressed payload data, rather than with the complete gzip container. You can get gunzip to complain by setting the "Transparent" option to 0, like this gunzip \$utf8gz => \my $buffer, Transparent => 0 or die "cannot gunzip: $GunzipError\n"; Does that solve your issue? Paul
MIME-Version: 1.0
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Content-Type: multipart/alternative; boundary="001a114324ba6648a1054f27ef30"
X-Ah-Spam-Helo: mail-wr0-f198.google.com
X-Spam-Score: -5.998
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] booking.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] booking-com.20150623.gappssmtp.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id C74F924036C for <cpan-bug+IO-Compress [...] hipster.bestpractical.com>; Wed, 10 May 2017 05:33:31 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9EA8EXyxpiTe for <cpan-bug+IO-Compress [...] hipster.bestpractical.com>; Wed, 10 May 2017 05:33:29 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id 4F8E4240211 for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 05:33:29 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 255F611DDED for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 02:33:28 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 92C7F11F217 for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 02:33:24 -0700 (PDT)
Received: from mail-out8.booking.com (mail-out8.booking.com [5.57.21.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id AD00A11DDED for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 02:33:18 -0700 (PDT)
Received: from mqueue-101.ams4.prod.booking.com ([10.192.5.4]:60215) by mtx-105.ams4.prod.booking.com with esmtp (Exim 4.86) (envelope-from <jeroen.vanwolffelaar [...] booking.com>) id 1d8Nk4-000GCe-MJ for bug-IO-Compress [...] rt.cpan.org; Wed, 10 May 2017 11:17:08 +0200
Received: from exscan-201.lhr4.lom.booking.com (exscan-201.lhr4.prod.booking.com [10.182.5.20]) by mqueue-101.ams4.prod.booking.com (Postfix) with ESMTP id A2718184 for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 11:17:08 +0200 (CEST)
Received: from localhost.localdomain (localhost [127.0.0.1]) by exscan-201.lhr4.lom.booking.com (Postfix) with SMTP id 3wN9c440SZz3fDB6 for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 11:17:08 +0200 (CEST)
Received: from mx4.booking.com (mrx-212.lhr4.prod.booking.com [10.182.5.5]) by exscan-201.lhr4.lom.booking.com (Postfix) with ESMTPS id 3wN9bz2nTCz3f9yX for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 11:17:03 +0200 (CEST)
Received: from mail-wr0-f198.google.com ([209.85.128.198]:45530) by mrx-212.lhr4.prod.booking.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86) (envelope-from <jeroen.vanwolffelaar [...] booking.com>) id 1d8Njz-000CDQ-3G for bug-IO-Compress [...] rt.cpan.org; Wed, 10 May 2017 11:17:03 +0200
Received: by mail-wr0-f198.google.com with SMTP id l9so6493622wre.12 for <bug-IO-Compress [...] rt.cpan.org>; Wed, 10 May 2017 02:17:03 -0700 (PDT)
Received: by 10.223.142.56 with HTTP; Wed, 10 May 2017 02:16:21 -0700 (PDT)
Delivered-To: cpan-bug+IO-Compress [...] hipster.bestpractical.com
Subject: Re: [External] [rt.cpan.org #121545] IO::Uncompress::Gunzip silently does not process utf8 strings
Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=booking.com ; s=bk; h=Content-Type:To:Subject:Message-ID:Date:From:References:In-Reply-To :MIME-Version; bh=+htvtGK6HQY1fWVsgOBGYmqfyVrQlhtNX7sv0jlC95Y=; b=tRVw5gACnBL H+Jc+Z+zaVxyNihw5TL2VASy2AKrrMQ8QB7NGzIuyg3K1uJmoHTBKGHO84EnjvCQ7EspwqeTgJ90b OmxnYzSoHdM9jsaQ2X8r7pSUorynlbt29SbSUSvXnim5jnQn/0wX5LP2EyOKYZgCQY/2g+InbS0Hy PEWbSw=;
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=booking-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=+htvtGK6HQY1fWVsgOBGYmqfyVrQlhtNX7sv0jlC95Y=; b=CwkX68EaNgWOXPRzFO5UZalWO/l6P6GQ80y8qyx+EFw+eL7quG4LGnLAwg3MBnMF5H 7BMtN1PTqkI7C3hg63HCtABBQdS13Qt9MuevmvvyorGFuENh5LjdlgYZ7HZ1P6m7l91S swqPt2u/cWcTQfoseUSPPmcsZb5ICIa2J9yqS+Muy8FlAd0Up5+aMvlHgHkO3knh4e8Q 3UdhUhTSLYOLvZDweAj/lj1jc92OoPdxvwPLYxjapvY1myma2Y95nU+h/DSKJLU+BJy6 QsmLSVHdCU82zzQ0IAE4WRh6Z/jH8E0nAuVcZpWYFj1+H1mI22kKJwUBCJD6vBo+bhw3 HmfQ==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=+htvtGK6HQY1fWVsgOBGYmqfyVrQlhtNX7sv0jlC95Y=; b=jAu0Zxu2/nZWVkuQAAf9RODY4UVDrGaTbkf7ggdkxhHYKy/16gd5qIwUCwMEM3B3hS /n/3MlnlaaCGh7KdOwXJKX/MdY1r9d3p3JAMYieUmq9Dj6vIAOm/ufNQCsJetYOIF5A5 5nTtE3hoIKCbIG5nlb4v2LhyJUmg575DJnd9NjF34KYUW9Kqj212fjda2LeTcyfXPj3p ggwpD12966MLx1FwsEEdAHtOCEDT2xSoWLOS7l+loLs5DrnxZlEw9FkH5NtW6LEB4oe7 lSQOOVVWrLB25gBno8in4SPJ2BBCAD+07q+AoqBxvO2Iv1YQdLWmfBVdR9Kbe3XYQ7p4 Uzsg==
Date: Wed, 10 May 2017 11:16:21 +0200
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FORGERY_TARGET 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTH_SIZE_3000_MORE 0, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_6000_6999 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, FROM_NAME_PHRASE 0, HEX28_LC_NOT_GOOGLE 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SPF_PASS 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FORWARDED_MSG 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HELO_SHIPPING 0, __HEX28_LC_BOUNDARY 0, __HTML_AHREF_TAG 0, __HTML_TAG_DIV 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MULTIPLE_URI_TEXT 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __RCVD_SHIPPING 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_WWW 0, __URI_NS , __URI_WITHOUT_PATH 0, __URI_WITH_PATH 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-Ah-RCPT: bug-IO-Compress [...] rt.cpan.org
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2017.5.10.92116
X-Fireeye: Clean
To: bug-IO-Compress [...] rt.cpan.org
X-GM-Message-State: AODbwcBV6iiEMtZypQcWodAgOHs0FQ1+MdvP06nD5P+MtHyMhQ+OI7FK fsjwmih92LquipiJKPvRzGFhBXYLewQstJnPk+WgK8eMGpbxbL/Rz3qJiogfxZXtXW9RkIlEZRr jjKfQxbqiRlJkYGyDaEGOSne/cDJ1
X-Ah-From: jeroen.vanwolffelaar [...] booking.com
In-Reply-To: <rt-4.0.18-4838-1494405297-1170.121545-6-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-5.998 tagged_above=-99.9 required=10 tests=[AWL=-0.000, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_OUR_RT=-4, HTML_MESSAGE=0.001, SPF_FAIL=0.001] autolearn=ham
X-RT-Interface: API
References: <RT-Ticket-121545 [...] rt.cpan.org> <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com> <rt-4.0.18-23177-1494342389-1007.121545-6-0 [...] rt.cpan.org> <CADp9wovhpsZ9=vHkmwszhd7-4H4aj_bVYM0HDuw1QwhqvGrZEQ [...] mail.gmail.com> <rt-4.0.18-18959-1494370539-210.121545-6-0 [...] rt.cpan.org> <rt-4.0.18-4838-1494405297-1170.121545-6-0 [...] rt.cpan.org>
Message-ID: <CADp9wot7oieqU65f7YoLvvKX7J9tmyekAVADOmfr-evzEGjbuA [...] mail.gmail.com>
X-Received: by 10.28.8.17 with SMTP id 17mr334973wmi.61.1494407822565; Wed, 10 May 2017 02:17:02 -0700 (PDT)
X-Received: by 10.28.8.17 with SMTP id 17mr334967wmi.61.1494407822323; Wed, 10 May 2017 02:17:02 -0700 (PDT)
X-Verified-External: Yes
Return-Path: <jeroen.vanwolffelaar [...] booking.com>
X-RT-Mail-Extension: io-compress
X-Original-To: cpan-bug+IO-Compress [...] hipster.bestpractical.com
X-Greylist: delayed 968 seconds by postgrey-1.34 at xx1.develooper.com; Wed, 10 May 2017 02:33:19 PDT
From: Jeroen van Wolffelaar <jeroen.vanwolffelaar [...] booking.com>
RT-Message-ID: <rt-4.0.18-21878-1494408812-247.121545-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 2388
Download (untitled) / with headers
text/plain 2.3k
Ah... I didn't know about that option. It surprises me -- well, the option has its uses I guess, but it being default '1' is, let's put it this way, not a decision I would have taken :). Unless you read through all the options in perldoc and notice "Transparent", what it does, and its default (I didn't notice, while I did read a fair share of IO::Uncompress::Gunzip, and the FAQ, while debugging and before filing a bug report), you expect this program: my $text = "this is not compressed data\n"; gunzip \$text => \my $result or die; print $result; to die, but instead, it just prints "this is not compressed data"; At the same time, I understand that changing the default of Transparant is... not an option, for backwards compatibility reasons. However, the perldoc page could be very warning-ish and vocal about it -- that if you have an error in your input (like, not actual gz data), you will just get your input back. And the examples could list Transparent => 0 in them all to show that this is a conservative default. That is a spin off of this bug then, "Transparent => 1 is default and people may not expect that" -- with, I guess, only documentation changes as an action point (if you agree). The actual core part of this bug would then be, rephrased: "Under Transparent => 1, gunzip detects utf8-encoded gzip data as "not gz-data", and hence passes it through verbatim". Given that you can easily end up with utf8 data through interfacing libraries etc etc if you do things wrong, and things like 'print', writing to file, and basically all normal I/O operations "just" still work without complaining, I would still expect also gunzip to "just" still work under this condition, and behave as if the data is bytes turned to utf8 with utf8::upgrade. --Jeroen On Wed, May 10, 2017 at 10:34 AM, Paul Marquess via RT < bug-IO-Compress@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=121545 > > > Hey Jeroen, > > aaah, I see what your problem is now! Your example of how > File::Slurp::write_file worked made me think your issue was with the > compressed payload data, rather than with the complete gzip container. > > You can get gunzip to complain by setting the "Transparent" option to 0, > like this > > gunzip \$utf8gz => \my $buffer, Transparent => 0 > or die "cannot gunzip: $GunzipError\n"; > > Does that solve your issue? > > Paul > >
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 3361
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-21878-1494408812-247.121545-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-121545 [...] rt.cpan.org> <CADp9wose5Nf+uCLYxi7BKwFQGFt1seMOjhXPVNk-q3pC4Es8Lg [...] mail.gmail.com> <rt-4.0.18-23177-1494342389-1007.121545-6-0 [...] rt.cpan.org> <CADp9wovhpsZ9=vHkmwszhd7-4H4aj_bVYM0HDuw1QwhqvGrZEQ [...] mail.gmail.com> <rt-4.0.18-18959-1494370539-210.121545-6-0 [...] rt.cpan.org> <rt-4.0.18-4838-1494405297-1170.121545-6-0 [...] rt.cpan.org> <CADp9wot7oieqU65f7YoLvvKX7J9tmyekAVADOmfr-evzEGjbuA [...] mail.gmail.com> <rt-4.0.18-21878-1494408812-247.121545-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-24289-1494410957-881.121545-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 121
Download (untitled) / with headers
text/plain 121b
I suspect if I was writing this again I wouldn't make Transparent the default. Agree though that this needs documented.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.