title: How can I output UTF-8 from Perl?
body: <p>I am trying to write a Perl script using the <code>utf8</code> pragma, and I'm getting unexpected results.  I'm using Mac OS X 10.5 (Leopard), and I'm editing with TextMate.  All of my settings for both my editor and operating system are defaulted to writing files in utf-8 format.</p>
  <p>However, when I enter the following into a text file, save it as a &quot;.pl&quot;, and execute it, I get the friendly &quot;diamond with a question mark&quot; in place of the non-ASCII characters.</p>
  <pre><code>#!/usr/bin/env perl -w
  
  use strict;
  use utf8;
  
  my $str = 'Çirçös';
  print( &quot;$str\n&quot; );
  </code></pre>
  <p>Any idea what I'm doing wrong? I expect to get 'Çirçös' in the output, but I get '�ir��s' instead.</p>