Greetings, Perl Monks

I have recently converted a simple Perl script to an excutable using PerlApp 8.1. The script basically has one textfield for input and another for output. It works fine under Perl interpreter but I'm having an unexpected problem with the packaged excutable.

It is this: when I input the Enlish words in the textfiled, no problem with the output at all. But when I try some Chinese characters (encoded in GB2312 by default under my Windows XP Chinese version), something weird happens. It seems to be okay with only one chinese character but with more than one, there will be junk characters. For example, if I input Chinese characters "好人"(literally "good guy"), the output becomes "好"(first character okay but the second becomes meaningless). It looks like that something is truncated somehow by PerlApp. Any ideas on how I can fix this problem? Thanks in advance

Following is a simplified version to demonstrate the problem.

Thanks again

use Win32::GUI; $mw = new Win32::GUI::DialogBox( -text => 'Test', -left => 300, -top => 100, -left => 60, -width => 200, -height => 200, ); $mw->Show(); $text = $mw->AddTextfield( -left => 0, -top => 10, -size => [150,25], ); $result = $mw->AddTextfield( -left => 0, -top => 40, -size => [180,100], ); $button = $mw->AddButton( -name => 'button', -text => 'Go', -left => 160, -top => 10, -visible =>1, -default => 1, -ok => 1, ); $text->SetFocus(); Win32::GUI::Dialog; sub button_Click { $line = $text->GetLine(1); $result->Append($line); }

In reply to How do I fix junk characters issue in Perlapp'ed script? by ZJ.Mike.2009

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.