Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 74837 invoked from network); 26 May 2006 21:56:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 May 2006 21:56:52 -0000 Received: (qmail 39572 invoked by uid 500); 26 May 2006 21:56:43 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 39529 invoked by uid 500); 26 May 2006 21:56:43 -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 39485 invoked by uid 99); 26 May 2006 21:56:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2006 14:56:43 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jagerman@jagerman.com designates 216.18.5.100 as permitted sender) Received: from [216.18.5.100] (HELO myth.nmsrv.com) (216.18.5.100) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2006 14:56:41 -0700 Received: from myth.nmsrv.com (localhost [127.0.0.1]) by myth.nmsrv.com (Postfix) with ESMTP id 73D8B12CBD8; Fri, 26 May 2006 14:56:18 -0700 (PDT) Received: from [192.168.1.133] (office.gossamer-threads.com [216.18.5.209]) by myth.nmsrv.com (Postfix) with ESMTP; Fri, 26 May 2006 14:56:18 -0700 (PDT) Message-ID: <44777981.70101@jagerman.com> Date: Fri, 26 May 2006 14:56:17 -0700 From: Jason Rhinelander User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: Gunnar Koppel CC: modperl@perl.apache.org Subject: Re: mp2: utf-8 and uc() under modperl2 References: <4475E5EC.4050501@raamatukoi.ee> In-Reply-To: <4475E5EC.4050501@raamatukoi.ee> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Gunnar Koppel wrote: > Terr! >=20 > I have little problem with UTF-8 under modperl2. I made such little > script for testing: >=20 > ------- > #!/usr/bin/perl >=20 > use strict; > use locale; > use utf8; > binmode stdin, ":utf8"; > binmode stdout, ":utf8"; >=20 > my @alpha =3D qw(a b c d e f g h i j k l m n o p q r s =C5=A1 z =C5=BE = t u v =C3=B5 =C3=A4 =C3=B6 =C3=BC > x y); > print "Content-Type: text/plain; charset=3DUTF-8\n\n"; > print "LC_CTYPE: $lc\n"; > print "\u$_ " foreach @alpha; > print "\n"; > ------- The script as above doesn't work out of the box -- the '$lc' variable isn't defined. Commenting out that line, I got the same results as you and eventually figured it out to be a problem with using 'stdout' instead of 'STDOUT' in your binmode() calls. Changing the binmode from: binmode stdout, ":utf8"; to: binmode STDOUT, ":utf8"; makes it work properly. This seems to me like a bug, but perhaps someone more familiar with mod_perl's STDOUT tying than I can explain this (or confirm this as a bug). --=20 -- Jason Rhinelander