problems with accented characters in Tk804.027 and perl 5.8.7

Petr Pajas <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Hi Nick, All,

I guess that something must have changed in the Perl internals in 
5.8.7 because since that version Tk804.027 doesn't display accented 
characters properly in Text and some other widget. The test case  
attached creates a Text field with a few Czech characters in it. 

In the test case, the characters are displayed correctly as long as 
you place cursor in the middle of them and use left/right arrow 
keys to move the cursor along the text. While the cursor stays on 
the same place, the characters right of it start moving and soon 
they start overlapping the characters on the left. In some 
scenarios even the initial displaying of the text is wrong.

First time I've seen it was on a Windows box (with the lastes AP 
build which is based on 5.8.7) but now that I recompiled the 
particular version of Perl and Tk on Fedora 3 I can see it's a 
cross-platform issue.

I wish somebody could identify the cause of the problem and fix it 
either in Tk or Perl. Unfortunately, I have know knowledge of Tk 
internals myself.

A test case is attached.
A screenshot can be found at http://pajas.matfyz.cz/perltk.png.

Thanks,

-- Petr
text_test.pl (application/x-perl, 135 B)
#!/usr/bin/perl

use Tk;
use Tk::Text;
use utf8;
$top = MainWindow->new;
$top->Text->pack->insert('0.0','ěščřžýáí');
MainLoop;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.