Re: problems with accented characters in Tk804.027 and perl 5.8.7

Gisle Aas <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
"Konovalov, Vadim" <[email protected]> writes:

> > 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. 
> 
> very interesting behaviour, indeed.
> 
> I checked 5.8.6 built with ActiveState and it does not have such a problem,
> whereas 5.8.7 misbehaves.

We have now tracked down this problem and patched Tk for the upcoming
ActivePerl like this:

--- Tk.pm.~1~	Wed Nov  2 05:16:32 2005
+++ Tk.pm	Wed Nov  2 05:16:32 2005
@@ -20,7 +20,7 @@
 
 use Encode;
 $Tk::encodeStopOnError = Encode::FB_QUIET();
-$Tk::encodeFallback    = Encode::FB_PERLQQ(); # Encode::FB_DEFAULT();
+$Tk::encodeFallback    = Encode::PERLQQ(); # Encode::FB_DEFAULT();
 
 our %font_encoding = ('jis0208' => 'jis0208-raw',
                       'jis0212' => 'jis0212-raw',
End of Patch.

The problem is that FB_PERLQQ implies LEAVE_SRC for Encode-2.10 and
beyond, but Tk's encGlue.c wrappers depend on the source string to get
truncated.

Regards,
Gisle Aas,
ActiveState
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
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.