Perl 5.8.1, whenever that happens, will have bytes::substr().
--
Jarkko Hietaniemi [EMAIL PROTECTED] http://www.iki.fi/jhi/ There is this special
biologist word we use for 'stable'. It is 'dead'. -- Jack Cohen
At 9:07 am -0500 27/8/03, [EMAIL PROTECTED] wrote:
I'm working with a byte oriented protocol, and need to extract byte n1 through
byte n2 from a string. Problem is, the string can be UTF8, and substr() is
character oriented. What (if anything) is the best way to do this in Perl?
Untitled 3.txt
I'm working with a byte oriented protocol, and need to extract byte n1 through
byte n2 from a string. Problem is, the string can be UTF8, and substr() is
character oriented. What (if anything) is the best way to do this in Perl?
Any/all ideas welcome. I would prefer a pure Perl (non XS)
Hi,
[EMAIL PROTECTED] wrote:
So given a string of utf8 data $x I want to be able to extract bytes 3 - 12 from
it...not characters :(
Then
Encode::_utf8_off ($bytes);
should do the job for you; it should force byte semantics on the stream
and change the behavior of substr(). Alternatively (w/o