Help for this page

Select Code to Download


  1. or download this
    use Test::More tests => 4;
    
    ...
    is(substr($bin, 100, 5), "\x64\x65\x66\x67\x68", 'no bytes,  UTF8=1');
    use bytes;
    is(substr($bin, 100, 5), "\x64\x65\x66\x67\x68", 'use bytes, UTF8=1');
    
  2. or download this
    1..4
    ok 1 - no bytes,  UTF8=0
    ok 2 - use bytes, UTF8=0
    ok 3 - no bytes,  UTF8=1
    ok 4 - use bytes, UTF8=1