title: Perl error related to Encode.pm
body: <p>I have the following software:</p>
  
  <p>Ubuntu Linux 14.04 LTS</p>
  
  <pre><code>$ uname -a
  Linux XXX 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  </code></pre>
  
  <p>Perl 5.18:</p>
  
  <pre><code>$ perl -version
  
  This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
  (with 41 registered patches, see perl -V for more detail)
  </code></pre>
  
  <p>and Encode.pm 2.49:</p>
  
  <pre><code>$ head -n 10 /usr/lib/perl/5.18/Encode.pm
  #
  # $Id: Encode.pm,v 2.49 2013/03/05 03:13:47 dankogai Exp dankogai $
  </code></pre>
  
  <p>When I use <a href="https://packages.debian.org/experimental/ikiwiki" rel="nofollow">ikiwiki</a>, which is a package using Encode.pm, I got the following error:</p>
  
  <pre><code>$ ikiwiki --setup ~/wiki.setup
  Cannot decode string with wide characters at /usr/lib/perl/5.18/Encode.pm line 176.
  </code></pre>
  
  <p>Lines 166 - 180 of Encode.pm reads:</p>
  
  <pre><code>sub decode($$;$) {
      my ( $name, $octets, $check ) = @_;
      return undef unless defined $octets;
      $octets .= '';
      $check ||= 0;
      my $enc = find_encoding($name);
      unless ( defined $enc ) {
          require Carp;
          Carp::croak("Unknown encoding '$name'");
      }
      my $string = $enc-&gt;decode( $octets, $check );
      $_[1] = $octets if $check and !ref $check and !( $check &amp; LEAVE_SRC() );
      return $string;
  }
  </code></pre>
  
  <p>Does any kind soul have idea how to fix this issue?</p>