perl-unicode

Re: UTF-8 case conversion

2003-09-03 06:30:05
On Wed, 3 Sep 2003, Andreas J Koenig wrote:

On Wed, 3 Sep 2003 13:05:21 +0200 (CEST), 
sigfrid(_dot_)lundberg(_at_)lub(_dot_)lu(_dot_)se said:

  > I wrote a small script (see below), trying to transform ÖRJAN
  > LUNDSTRÖM into Örjan Lundström, but it seems to fail, probably because
  > of locale related problems. My question is then simply. How do I do
  > this then?

Do not leave filehandles in some dubious default state. Tell perl what
you expect and what you want to see on each and every filehandle.

...

  > 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 :)

Thanks!

Sigge


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