Re: bytes::substr() ?

2003-09-03 Thread Jarkko Hietaniemi
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

Re: bytes::substr() ?

2003-09-02 Thread John Delacour
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

bytes::substr() ?

2003-08-27 Thread ed-perluni
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)

Re: bytes::substr() ?

2003-08-27 Thread Guido Flohr
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