[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/usr/src/Encode-compat-0.05/lib/Encode/compat/ -> 5006001.pm (source)

   1  # $File: //member/autrijus/Encode-compat/lib/Encode/compat/5006001.pm $ $Author: autrijus $
   2  # $Revision: #3 $ $Change: 2534 $ $DateTime: 2002/12/02 00:33:16 $
   3  
   4  package Encode::compat::5006001;
   5  our $VERSION = '0.05';
   6  
   7  1;
   8  
   9  package Encode;
  10  
  11  use strict;
  12  use base 'Exporter';
  13  no warnings 'redefine';
  14  
  15  sub _utf8_on {
  16      $_[0] = pack('U*', unpack('U0U*', $_[0]))
  17  }
  18  
  19  sub _utf8_off {
  20      $_[0] = pack('C*', unpack('C*', $_[0]))
  21  }
  22  
  23  sub is_utf8 {
  24      # XXX: got any better ideas?
  25      use utf8;
  26      foreach my $char (split(//, $_[0])) {
  27      return 1 if ord($char) > 255;
  28      }
  29      return 0;
  30  }
  31  
  32  1;


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1