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:
nick
Date:
January 20, 2001 14:30
Subject:
Re: 8482 busted for $^V sprintf()s on OS/390
Message ID:
E14K6U8-00072j-00@roam1
Jarkko Hietaniemi <jhi@iki.fi> writes:
>> Wide character in print at perlbug.PL line 62.
>> make[1]: *** [perlbug] Error 142
>> make[1]: Leaving directory `/home/pvhp/perl/8482/perl/utils'
>> make: *** [utilities] Error 2
>> $
>> 
>> That too can be worked around by commenting out the mention of $^V.
>> 
>> Could this be fallout from Hugo's recent sprintf work?
>
>Probably not.
>
>"Wide character in print" means that a string was (internally) marked
>UTF-8 and the string truly contains > 0xff (wide) characters, and you
>tried to output that.  Since wide characters cannot be output as such
>(a conversion to bytes is needed, using some character set mapping),
>print() barfed.  This is one of the dreaded "should not happen" cases.

It can happen easily enough, and a PerlIO layer which is tagged as accepting
utf8 will not give that error but (should) give its own error if it cannot 
represent the character. But we have not changed anything in that area 
recently, so I think print is being fed junk. Possibly (as this is OS390)
we have one of those EBCDIC issues here.

I suspect Hugo's patch has spuriously set the UTF8 flag - the mix of U8 and 
char that was there before Peter's patch shows wooly UTF8 thinking.
My gut feeling by the way is that Peter's patch did that backwards - i.e.
rather than making the variable U8 it should have not-cast SvPV. 

-- 
Nick Ing-Simmons


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