>>>>> On Wed, 3 Sep 2003 15:58:28 +0300, Jarkko Hietaniemi <[EMAIL PROTECTED]> said:

 >> >   > from_to $orjan,'latin1','utf-8';
 >> >   > from_to  $lundstrom,'latin1','utf-8';
 >> >
 >> > Add this and you're there:
 >> >
 >> > binmode STDOUT, ":utf8";
 >> 
 >> Now, this did help. I'm starting to learn :)

  > Well, yes, that helps in the way that Perl knows you really intend to
  > "speak utf8" to STDOUT, and doesn't warn you.  But the from_to():s
  > leave your data in somewhat messy state: they are byte strings but the
  > bytes just happen to encode in UTF-8 some Unicode characters.  Instead
  > of from_to() either use decode():
        
  >     $data = decode("latin-1", $data);

  > or if you have an editor that handles UTF-8, just say "use utf8;" at
  > the top of your script and write your script, including the string
  > literals, in UTF-8.

Oops. Sorry for the wrong advice. I wonder where my head was spinning...

-- 
andreas

Reply via email to