Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 50681
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: phatwares [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 804.028
Fixed in: (no value)



Subject: Tk::Menu will not display Unicode characters
Perhaps this is a bug, or perhaps I just don't know what I'm doing ... But here's the problem. I cannot get Unicode to display correctly in a Tk::Menu Cascade. For example: my $mb = $mw->Menu(); my $fc = $mb->cascade(-label => "\x{0424}\x{0430}\x{0439}\x{043B}"); $mw->configure(-menu => $mb); So I should have a menu-bar item that displays 4 Unicode characters, right? But no, I get a menu-bar item that displays the exact string '\x{0424}\x{0430}\x{0439}\x{043B}'. I CAN get Unicode to display correctly on a Command coming off a Cascade. For example: my $mb = $mw->Menu(); my $fc = $mb->cascade(-label => "File"); $fc->command(-label => "\x{0412}\x{044B}\x{0445}\x{043E}\x{0434}", -command => sub{}); $mw->configure(-menu => $mb); So I should have a drop-down menu item that displays 4 Unicode characters, and it WORKS. No other Tk widgets are giving me this problem with Unicode. Any help would be greatly appreciated (if I'm doing something wrong). I'm using ActivePerl 32-bit 5.10.1005, Tk 804.028, and WinVista 64-bit SP 2.
On Tue Oct 20 11:01:43 2009, PHATWARES wrote: Show quoted text
> Perhaps this is a bug, or perhaps I just don't know what I'm doing ... > But here's the problem. > I cannot get Unicode to display correctly in a Tk::Menu Cascade. For > example: > > my $mb = $mw->Menu(); > my $fc = $mb->cascade(-label => "\x{0424}\x{0430}\x{0439}\x{043B}"); > $mw->configure(-menu => $mb); > > So I should have a menu-bar item that displays 4 Unicode characters, > right? But no, I get a menu-bar item that displays the exact string > '\x{0424}\x{0430}\x{0439}\x{043B}'. > > I CAN get Unicode to display correctly on a Command coming off a > Cascade. For example: > > my $mb = $mw->Menu(); > my $fc = $mb->cascade(-label => "File"); > $fc->command(-label => "\x{0412}\x{044B}\x{0445}\x{043E}\x{0434}", > -command => sub{}); > $mw->configure(-menu => $mb); > > So I should have a drop-down menu item that displays 4 Unicode > characters, and it WORKS. > > No other Tk widgets are giving me this problem with Unicode. Any help > would be greatly appreciated (if I'm doing something wrong). > > I'm using ActivePerl 32-bit 5.10.1005, Tk 804.028, and WinVista 64-bit
SP 2. No, you don't do anything wrong. On a Linux system I see the cyrillic characters ("fajl"). So it's probably a Windows-only problem, which needs investigation... Regards, Slaven
On Mon Oct 26 16:40:44 2009, SREZIC wrote: Show quoted text
> On Tue Oct 20 11:01:43 2009, PHATWARES wrote:
> > Perhaps this is a bug, or perhaps I just don't know what I'm doing ... > > But here's the problem. > > I cannot get Unicode to display correctly in a Tk::Menu Cascade. For > > example: > > > > my $mb = $mw->Menu(); > > my $fc = $mb->cascade(-label => "\x{0424}\x{0430}\x{0439}\x{043B}"); > > $mw->configure(-menu => $mb); > > > > So I should have a menu-bar item that displays 4 Unicode characters, > > right? But no, I get a menu-bar item that displays the exact string > > '\x{0424}\x{0430}\x{0439}\x{043B}'. > > > > I CAN get Unicode to display correctly on a Command coming off a > > Cascade. For example: > > > > my $mb = $mw->Menu(); > > my $fc = $mb->cascade(-label => "File"); > > $fc->command(-label => "\x{0412}\x{044B}\x{0445}\x{043E}\x{0434}", > > -command => sub{}); > > $mw->configure(-menu => $mb); > > > > So I should have a drop-down menu item that displays 4 Unicode > > characters, and it WORKS. > > > > No other Tk widgets are giving me this problem with Unicode. Any help > > would be greatly appreciated (if I'm doing something wrong). > > > > I'm using ActivePerl 32-bit 5.10.1005, Tk 804.028, and WinVista 64-bit
> SP 2. > > No, you don't do anything wrong. On a Linux system I see the cyrillic > characters ("fajl"). So it's probably a Windows-only problem, which > needs investigation...
The problem is now fixed in Perl/Tk's subversion repository as change r13802. Regards, Slaven
On Wed Feb 03 02:53:47 2010, SREZIC wrote: Show quoted text
> On Mon Oct 26 16:40:44 2009, SREZIC wrote:
> > On Tue Oct 20 11:01:43 2009, PHATWARES wrote:
> > > Perhaps this is a bug, or perhaps I just don't know what I'm doing ... > > > But here's the problem. > > > I cannot get Unicode to display correctly in a Tk::Menu Cascade. For > > > example: > > > > > > my $mb = $mw->Menu(); > > > my $fc = $mb->cascade(-label => "\x{0424}\x{0430}\x{0439}\x{043B}"); > > > $mw->configure(-menu => $mb); > > > > > > So I should have a menu-bar item that displays 4 Unicode characters, > > > right? But no, I get a menu-bar item that displays the exact string > > > '\x{0424}\x{0430}\x{0439}\x{043B}'. > > > > > > I CAN get Unicode to display correctly on a Command coming off a > > > Cascade. For example: > > > > > > my $mb = $mw->Menu(); > > > my $fc = $mb->cascade(-label => "File"); > > > $fc->command(-label => "\x{0412}\x{044B}\x{0445}\x{043E}\x{0434}", > > > -command => sub{}); > > > $mw->configure(-menu => $mb); > > > > > > So I should have a drop-down menu item that displays 4 Unicode > > > characters, and it WORKS. > > > > > > No other Tk widgets are giving me this problem with Unicode. Any help > > > would be greatly appreciated (if I'm doing something wrong). > > > > > > I'm using ActivePerl 32-bit 5.10.1005, Tk 804.028, and WinVista 64-bit
> > SP 2. > > > > No, you don't do anything wrong. On a Linux system I see the cyrillic > > characters ("fajl"). So it's probably a Windows-only problem, which > > needs investigation...
> > The problem is now fixed in Perl/Tk's subversion repository as change > r13802. > > Regards, > Slaven > >
Thanks very much! 1000 Bonus Points to Slaven for fixing the problem! =) Cheers, phatWares
On Wed Feb 03 08:15:46 2010, PHATWARES wrote: Show quoted text
> On Wed Feb 03 02:53:47 2010, SREZIC wrote:
> > On Mon Oct 26 16:40:44 2009, SREZIC wrote:
> > > On Tue Oct 20 11:01:43 2009, PHATWARES wrote:
> > > > Perhaps this is a bug, or perhaps I just don't know what I'm
doing ... Show quoted text
> > > > But here's the problem. > > > > I cannot get Unicode to display correctly in a Tk::Menu Cascade. For > > > > example: > > > > > > > > my $mb = $mw->Menu(); > > > > my $fc = $mb->cascade(-label => "\x{0424}\x{0430}\x{0439}\x{043B}"); > > > > $mw->configure(-menu => $mb); > > > > > > > > So I should have a menu-bar item that displays 4 Unicode characters, > > > > right? But no, I get a menu-bar item that displays the exact string > > > > '\x{0424}\x{0430}\x{0439}\x{043B}'. > > > > > > > > I CAN get Unicode to display correctly on a Command coming off a > > > > Cascade. For example: > > > > > > > > my $mb = $mw->Menu(); > > > > my $fc = $mb->cascade(-label => "File"); > > > > $fc->command(-label => "\x{0412}\x{044B}\x{0445}\x{043E}\x{0434}", > > > > -command => sub{}); > > > > $mw->configure(-menu => $mb); > > > > > > > > So I should have a drop-down menu item that displays 4 Unicode > > > > characters, and it WORKS. > > > > > > > > No other Tk widgets are giving me this problem with Unicode. Any
help Show quoted text
> > > > would be greatly appreciated (if I'm doing something wrong). > > > > > > > > I'm using ActivePerl 32-bit 5.10.1005, Tk 804.028, and WinVista
64-bit Show quoted text
> > > SP 2. > > > > > > No, you don't do anything wrong. On a Linux system I see the cyrillic > > > characters ("fajl"). So it's probably a Windows-only problem, which > > > needs investigation...
> > > > The problem is now fixed in Perl/Tk's subversion repository as change > > r13802. > > > > Regards, > > Slaven > > > >
> > > Thanks very much! 1000 Bonus Points to Slaven for fixing the problem! =) > Cheers, > phatWares
Slaven - Just one more question ... Where might I find the patched version of "Menu.pm"? I looked at CPAN, and the patch is not there yet. I looked at the Subversion repository and could not find it either. Thanks again! phatWares
Show quoted text
> > Slaven - > Just one more question ... Where might I find the patched version of > "Menu.pm"? I looked at CPAN, and the patch is not there yet. I looked at > the Subversion repository and could not find it either. Thanks again! > phatWares
The fix is not in Menu.pm, but in the C core of Tk, in pTk/mTk/tkWinMenu.c . So you have to recompile to try it out. This shouldn't be too hard if you're using Strawberry Perl, just do perl Makefile.PL dmake all test install but I don't if this would work with ActivePerl, as you need a C compiler. Regards, Slaven
Tk 804.029 was released before a few hours. Regards, Slaven