CrashBlossom has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
Back with another unicode question.
I am running strawberry perl 5.30 under windows 11.I want to be able to use a tk entry widget to accept and display strings containing unicode characters. Here is an example:
use strict; use warnings; use Tk; # displayed in entry field as: "09 Handel_ Water Music Suite - Bouré. +m4a" my $str = "09 Handel_ Water Music Suite - Bouré.m4a"; my $mw = MainWindow->new(-title => " Unicode Test"); $mw->Entry(-textvariable => \$str, -width => 50, -font => "{Lucida Fax} 12 bold", )->pack(qw(-side left -expand 1 -fill x)); MainLoop();
As indicated in the comment, the string is not displayed correctly in the entry field. Does anyone know how to fix this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to display/accept unicode chars in a tk entry widget
by kcott (Archbishop) on Jul 01, 2023 at 03:35 UTC | |
by CrashBlossom (Beadle) on Jul 01, 2023 at 14:07 UTC | |
|
Re: How to display/accept unicode chars in a tk entry widget
by soonix (Chancellor) on Jul 01, 2023 at 13:01 UTC | |
by CrashBlossom (Beadle) on Jul 01, 2023 at 14:11 UTC | |
by BillKSmith (Monsignor) on Jul 01, 2023 at 15:28 UTC |