perl-unicode

Re: Prototype for decode_utf8 incorrect?

2003-09-26 03:30:05
On Fri, Sep 26, 2003 at 06:32:41PM +0900, Dan Kogai wrote:
so we can make decode_utf8() as follows;

sub decode_utf8($;$)
{
    my ($str, $check) = @_;
    if ($check){
              return decode("utf8", @_);
      }else{
              return undef unless utf8::decode($str);
              return $str;
      }
}

Sure, worksforme.  Thanks!

/Autrijus/

Attachment: pgpX6iTVwU9yl.pgp
Description: PGP signature

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