develooper Front page | perl.perl5.porters | Postings from January 2001

Re: 8482 busted for $^V sprintf()s on OS/390

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
January 20, 2001 19:49
Subject:
Re: 8482 busted for $^V sprintf()s on OS/390
Message ID:
20010120214851.W22573@chaos.wustl.edu
On Sat, Jan 20, 2001 at 11:34:16PM +0000, Simon Cozens wrote:
> On Fri, Jan 19, 2001 at 03:27:05PM -0800, Peter Prymmer wrote:
> > That too can be worked around by commenting out the mention of $^V.
> 
> Very strange. First, I thought this was an obvious result of putting
> the EBCDIC<->Unicode tables in place, but I've realised we haven't put
> them in place! Something's messing up v-strings pretty badly. If you
> have a second, I'd appreciate it if you could try:
> 
> perl -le 'printf "%v", $^V'
> perl -le 'print ord for split //, $^V'
> perl -le 'use Devel::Peek; Dump($^V)'
> perl -le 'use Devel::Peek; $a = sprintf "%v", $^V; Dump($a)'

The last one even in a UNIX tells us:

SV = PV(0x140001ec0) at 0x140001b40
  REFCNT = 1
  FLAGS = (POK,READONLY,pPOK,UTF8)
  PV = 0x140014030 "128.256"\0
  CUR = 7
  LEN = 9

Ho-hum, what's the UTF8 flag doing in there?  It's not wrong as
such -- in ASCII, that is.  In EBCDIC, that's bad news since the
digits are >127.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About