Re: Fix UTF Encoding issue

[email protected] (Ismail Dönmez) Tue, 4 Dec 2007 10:28:59 +0200
Newsgroups perl.unicode
Organization Pardus / KDE
Message-ID <[email protected]>
Tuesday 04 December 2007 10:16:34 Martin Koegler yazmıştı:
[...]
> print t("#öäü");
> print t("#ÀöÌ");
> print "\n";

How about this one, doesn't even use Encode, uses just built-in utf8 
function :

[~]> cat test.pl
binmode STDOUT, ':utf8';

my $str = "#öäü";

if (utf8::valid($str))
{
    utf8::decode($str);
}

print $str."\n";

[~]> perl test.pl
#öäü

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.