Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 92292 invoked from network); 30 Jun 2009 13:33:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jun 2009 13:33:45 -0000 Received: (qmail 7193 invoked by uid 500); 30 Jun 2009 13:33:53 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 7157 invoked by uid 500); 30 Jun 2009 13:33:53 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 7149 invoked by uid 99); 30 Jun 2009 13:33:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 13:33:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andy@hexten.net designates 75.127.65.154 as permitted sender) Received: from [75.127.65.154] (HELO post.hexten.net) (75.127.65.154) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 13:33:44 +0000 Received: from voodoo.ripley (ca93nt.hexten.net [82.152.157.85]) by post.hexten.net (Postfix) with ESMTP id 875F6189445B for ; Tue, 30 Jun 2009 13:33:23 +0000 (GMT) Message-Id: From: Andy Armstrong To: mod_perl list In-Reply-To: <4A4A0F76.70307@ice-sa.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: quick pure perl question Date: Tue, 30 Jun 2009 14:33:22 +0100 References: <4A478F38.6070805@ice-sa.com> <16f65d000906280933p3b0b94a0g840e849c46d1c1d6@mail.gmail.com> <4A4A0F76.70307@ice-sa.com> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On 30 Jun 2009, at 14:13, Andr=E9 Warnier wrote: > I /would/ have expected it if I was /not/ specifying an encoding, =20 > like using simply '>'. But not when I am explicitly specifying =20 > '>:raw', which in my mind, and according to my interpretation of the =20= > on-line documentation, is equivalent to saying "output whatever you =20= > have as bytes in that string variable right now, as is, I know what =20= > I'm doing". You have that bit right - but the string doesn't contain bytes[1] - it =20= contains characters. Strings can either be an octet stream or a stream =20= of wide characters. By reading utf8 into a string you've turned it =20 into the latter. Perl's warning that you're pushing character data =20 into an octet hole. [1] of course it's /made/ of bytes but that's not how Perl sees it. --=20 Andy Armstrong, Hexten