Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Bug perl Tk ?

2 réponses
Avatar
Paul Gaborit
Avec le script suivant :

------------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
use Tk::widgets qw/Tree ItemStyle/;

my $mw = MainWindow->new();
$mw->fontCreate("MyFont", -family=> 'helvetica',
-size => 9, -weight=>'medium');

my $t = $mw->Tree()->pack();
$t->ItemStyle('imagetext', -stylename => 'foobar',
-activeforeground => '#ff0080', -font => 'MyFont',
);
$t->add('root', -style => 'foobar', -text => "foobar");
MainLoop;
------------------------------------------------------------

Je récupère l'erreur suivante :

============================================================
Tcl_GetStringFromObj @ 539 not utf8
SV = PV(0xb4f7f8) at 0x80bba0
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0xba74e0 "Display style \"\220h\244\" not found"\0Malformed UTF-8 character (unexpected continuation byte 0x90, with no preceding start byte) in subroutine entry at /usr/lib/perl5/Tk.pm line 247.
Malformed UTF-8 character (unexpected continuation byte 0xa4, with no preceding start byte) in subroutine entry at /usr/lib/perl5/Tk.pm line 247.
[UTF8 "Display style "\x{0}h\x{0}" not found"]
CUR = 29
LEN = 32
SV = PVMG(0x900830) at 0x80bba0
REFCNT = 1
FLAGS = (SMG,POK,pPOK,UTF8)
IV = 0
NV = 0
PV = 0xba74e0 "Display style \"\220h\244\" not found"\0Malformed UTF-8 character (unexpected continuation byte 0x90, with no preceding start byte) in subroutine entry at /usr/lib/perl5/Tk.pm line 247.
Malformed UTF-8 character (unexpected continuation byte 0xa4, with no preceding start byte) in subroutine entry at /usr/lib/perl5/Tk.pm line 247.
[UTF8 "Display style "\x{0}h\x{0}" not found"]
CUR = 29
LEN = 32
MAGIC = 0xba7560
MG_VIRTUAL = &PL_vtbl_utf8
MG_TYPE = PERL_MAGIC_utf8(w)
MG_LEN = 29
Display style "?h?" not found at /usr/lib/perl5/Tk.pm line 247.
============================================================

Et ce, sur Ubuntu (perl 5.8.8, Tk 1:804.027-7) et sur Windows
(activeperl 5.8.8.822, Tk 804.027-r6).

Constatez-vous le même bug ? Savez-vous si il existe un correctif ?

Merci.


--
Paul Gaborit - <http://perso.enstimac.fr/~gaborit/>
Perl en français - <http://perl.enstimac.fr/>

2 réponses

Avatar
jl_morel
Dans l'article ,
a dit...


Avec le script suivant :

------------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
use Tk::widgets qw/Tree ItemStyle/;

my $mw = MainWindow->new();
$mw->fontCreate("MyFont", -family=> 'helvetica',
-size => 9, -weight=>'medium');

my $t = $mw->Tree()->pack();
$t->ItemStyle('imagetext', -stylename => 'foobar',
-activeforeground => '#ff0080', -font => 'MyFont',
);
$t->add('root', -style => 'foobar', -text => "foobar");
MainLoop;
------------------------------------------------------------

Je récupère l'erreur suivante :

=========================================================== [couic]
=========================================================== >
Et ce, sur Ubuntu (perl 5.8.8, Tk 1:804.027-7) et sur Windows
(activeperl 5.8.8.822, Tk 804.027-r6).

Constatez-vous le même bug ? Savez-vous si il existe un correctif ?



Même type d'erreur sous Windows avec ActivePerl 5.8.8 et Tk 804.027-r6
et avec ActivePerl 5.10 et le dernier Tk 804.028 :

@ 535 not utf8
SV = PV(0x2ccd31c) at 0x2cd48d4
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0x2ce1724 "Display style "374b31021" not found"
Avatar
Patrick Texier
Le 14 Jan 2008 18:44:42 GMT, Jean-Louis MOREL a écrit :

Par contre, avec ActivePerl 5.6 et le vieux Tk 800.024, ça marche impec !


ActivePerl 5.8.6 build 811 avec Tk 804.027 donne l'erreur.