Hi, I've installed perl-tk on my debian system. A co-worker did the same install. He successfully runs the program below, but I get the results listed below. It looks to me like perl-tk is munging its paths to the font directories, but that may just be a by product of a different problem. There's nothing particularly exotic about my system. I'm stumped...anybody have any ideas? bigtiny the script:
#!/usr/bin/perl use Tk; my $mw = MainWindow->new; $mw->Label( -text => "foo" )->pack; $mw->Button( -text => "bar", -font => "times", -command => sub { exit +} )->pack; MainLoop;
result:
Tcl_GetStringFromObj @ 535 not utf8 SV = PV(0x88074ac) at 0x880f150 REFCNT = 1 FLAGS = (POK,pPOK,UTF8) PV = 0x880ffd8 "font \"\230\377\200\10etica -12 bold\" doesn't exist +"\0Malformed UTF-8 character (overflow at 0x74a63860, byte 0x2d, afte +r start byte 0xff) in subroutine entry at /usr/local/lib/perl/5.8.4/T +k/Widget.pm line 190. [UTF8 "font "\x{63f}\x{0}bold" doesn't exist"] CUR = 39 LEN = 40 SV = PVMG(0x880a848) at 0x880f150 REFCNT = 1 FLAGS = (SMG,POK,pPOK,UTF8) IV = 0 NV = 0 PV = 0x880ffd8 "font \"\230\377\200\10etica -12 bold\" doesn't exist +"\0Malformed UTF-8 character (overflow at 0x74a63860, byte 0x2d, afte +r start byte 0xff) in subroutine entry at /usr/local/lib/perl/5.8.4/T +k/Widget.pm line 190. [UTF8 "font "\x{63f}\x{0}bold" doesn't exist"] CUR = 39 LEN = 40 MAGIC = 0x8810060 MG_VIRTUAL = &PL_vtbl_utf8 MG_TYPE = PERL_MAGIC_utf8(w) MG_LEN = 27 font "??etica -12 bold" doesn't exist at /usr/local/lib/perl/5.8.4/Tk/ +Widget.pm line 190. at ./test.pl line 19 Tk::Widget::new('Tk::Label', 'MainWindow=HASH(0x87f2c8c)', '-t +ext', 'foo') called at /usr/local/lib/perl/5.8.4/Tk/Widget.pm line 25 +6 Tk::Widget::__ANON__('MainWindow=HASH(0x87f2c8c)', '-text', 'f +oo') called at ./test.pl line 19 at ./test.pl line 19

In reply to Weirdness getting perl-tk to work by bigtiny

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.