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

a use byte/utf8 experience

From:
Wolfgang Laun
Date:
September 18, 2000 04:48
Subject:
a use byte/utf8 experience
Message ID:
39C600DA.F5BC3E78@alcatel.at
Well, with all that discussion going on I'd like to contribute an
experience with this upcoming feature.

I'm assuming that the reader is familiar with cut(1), options -b and -n.

The implementation of this requires that, given some *byte* offset
into a string containing encoded characters, you find the previous
or next *byte* offset where a character starts.

This is not difficult to code (using use byte) but requires knowing
all about the representation of characters. (Blessed the one who can
read the Perl sources ;-)

Now my question is: Am I supposed to know of these implementation
details, and may I embed them into some Perl program without running
the risk that it'll break or become non-portable? Or is there something
missing from Perl (or is there something *I* missed)?

Regards,
-Wolfgang



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