perl-unicode

Re: Unicode aware module

1999-04-21 10:13:58
At 07:43 AM 4/21/99 , Chaim Frenkel wrote:
Why would this action at a distance _not_ break code.

      parent turns on utf8
      child attempts to process a binary string.

If the child thinks of it as binary data, then it would not be doing any
character oriented operations on it, hence it should not fail.

If the child is using character oriented operations assuming it is working
with an array of bytes, then it would need to save the state of the utf8 mode.

my $utf8state = <<utf8_state_flag>>

no utf8 if $utf8state;

... do work with character operators as though binary ...

use utf8 if $utf8state;

-- Dick

<Prev in Thread] Current Thread [Next in Thread>