develooper Front page | perl.perl5.porters | Postings from February 2000

Re: should "use byte" be "use bytes"?

From:
Ilya Zakharevich
Date:
February 9, 2000 15:01
Subject:
Re: should "use byte" be "use bytes"?
Message ID:
200002092301.SAA16191@monk.mps.ohio-state.edu
Mark Mielke writes:
> > My very limited understanding of utf is that unless I specifically
> > instruct perl5.6 otherwise, perl5.6 may possibly interpret some of my data
> > as meaningful utf thingies and do something I don't expect with it. In
> > this case, I want a way to turn off utf interpretation without having to
> > understand in any detail whatsoever what it is, other than that it could
> > wreck my data.
> 
> Here we have a case of not understanding, and you shouldn't use it.
> 
> This is all supposed to Work The Right Way. Ilya had to fight many
> battles to get people to understand this, which is what Larry was
> referring too.

I think that Andy is more correct here (in being afraid) than your
optimistic position.  The moment the information *is* read correctly
from the outside word, your optimistic position is completely applicable.

However, somebody *should* inform Perl that *this particular
filehandle* is accessing a file which contains a sequence of octets.
All that "my" approach achieves is it concentrates all these hard
decisions into one place: i/o operations (in the wider sense).  (As
opposed to deciding whether the argument is an octet or a char each
time you write a line of Perl code.)

But the decision during i/o should be made anyway.

Ilya



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