sub encode { my($text) = @_; $text =~ s{([\xc0-\xc3])(.)}{ my $hi = ord($1); my $lo = ord($2); chr((($hi & 0x03) <<6) | ($lo & 0x3F)) }ge; return $text; }
--
Check out my Perlmonks Related Scripts like framechat,
reputer, and xNN.
In reply to Re: Regexp to convert high-bit (?) characters to character entites
by epoptai
in thread Regexp to convert high-bit (?) characters to character entites
by hadleyw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |