title: XML::Simple encoding problem
body: <p>I have an xml-file I want to parse:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;tag&gt;û&lt;/tag&gt;
  </code></pre>
  
  <p>It's perfectly parsed by firefox. But XML::Simple corrupts some data. I have a perl-program like this: </p>
  
  <pre><code>my $content = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&gt;\n";
  $content .= "&lt;tag&gt;\x{c3}\x{bb}&lt;/tag&gt;\n";
  
  print "input:\n$content\n";
  
  my $xml = new XML::Simple;
  my $data = $xml-&gt;XMLin($content, KeepRoot =&gt; 1);
  
  print "data:\n";
  print Dumper $data;
  </code></pre>
  
  <p>and get:</p>
  
  <pre><code>input:
  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;tag&gt;û&lt;/tag&gt;
  
  data:
  $VAR1 = {
            'tag' =&gt; "\x{fb}"
          };
  </code></pre>
  
  <p>it doesn't seem to be what I expected. I think there some encoding issues. Am I doing something wrong?</p>
  
  <p>UPD:
  I thought that XMLin returned text in utf-8 (as the input). Just added</p>
  
  <pre><code>encode_utf8($data-&gt;{'tag'});
  </code></pre>
  
  <p>and it worked</p>