#! /usr/bin/perl -w use strict; use Tk; # use utf8; # <- makes everything even worse use Encode; my $enc = 'utf-8'; my $umlauts = 'öäü'; my $text = decode("utf-8", $umlauts); my $mw = MainWindow->new; # scrambled string widgets $mw->Label(-text => encode($enc, $umlauts))->pack; $mw->Label(-text => decode($enc, $umlauts))->pack; $mw->Label(-text => $umlauts)->pack; $mw->Label(-text => $text)->pack; $mw->Label(-text => encode("iso-8859-1", $umlauts))->pack; # the only one that creates shiny umlauts $mw->Label(-text => encode("iso-8859-1", $text))->pack; MainLoop;