in reply to Re: umlauts in Tk widgets
in thread umlauts in Tk widgets
As i read the given article in german already, i didn't find anything new in the english version.
I played around with your snippets and updated my script:So now I am able to convert strings loaded from files. Great thanks so far!#! /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;
But what about those umlauts typed into Entry or Text and compareable widgets?
> How "öäü" is represented will depend on your text editing environment.
|
|---|