I am trying desperatly to enable reliable Japanese support into my Perlscript. Do any of you have experience with getting perl to play nicely with a 2-Byte character set under PerlScript in IIS? Currently, IIS does nothing short of completely freak out. Consider this code:

<%@ LANGUAGE = PerlScript %> <html><body> <% use locale; $Response->Write("English<p>"); # English $Response->Write("日本語<p>" ); # Japanese (In Japanese) %> </body></html>

Most of you will see what Perl probably see...a bunch of line noise. I can leave the code alone, hit refresh, and Perl/IIS will generate different error values on different reloads. Usually it's a simple Syntax Error or </code>Cannot find string terminator '"'</code> but sometimes it will:

PerlScript Error Error:'80004005' (in cleanup) Unrecognized character \xBC example.asp, at Line 6

and sometimes, just for spite, it will work. ;-)

Perl and IIS are fine. If I take out the Japanese, I've no problems. Actually, if I put the Japanese inside of <%= 日本語 %> it seems to work fine, but that is kind of limiting when I need to send e-mail. I've tried embedding the Japanese in HEREDOC, qq() and others. No luck. I'm tempted to try to start parsing it out of a file, but one can imagine how ugly that might become.

Thus I ask: I know PerlScript doesn't really support Japanese yet, but is there any reliable way I can force it to do so anyway?

NT Server 4.0 Service Pack 6 & IIS
ActiveState 5.6.0 Build 623 (5.6.1 636 is out. I might try that tomorrow)

-Lexicon


In reply to PerlScript and Localization by Lexicon

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.