G
Guest
Hi All,
I try to put utf8 material into a browser page via a Perl script
embedded in an HTML page. The whole thing runs under Windows XP
Professional, I am using ActivePerl 5.8.0 and IE 6.0. A minimal
file exhibiting the problem is given here:
<HTML>
<HEAD>
<TITLE>PerlScript Minimal Test</TITLE>
</HEAD>
<BODY>
<H2>A Chinese Character: 一</H2><!-- test, works well -->
<SCRIPT LANGUAGE="PerlScript">
use utf8; # Doesn't seem to make any difference here
#
$abwwide="\x{0410}\x{0411}\x{0412}" # Cyrillic ABW
$window->document->write($abwwide); # Doesn't work
#
$abw ="ÐБВ" # Again Cyrillic ABW, but in utf8
$window->document->write($abw); # Doesn't work
#
# Direct approach
$window->document->write("ÐБВ"); # doesn't work, either
#
$htmlified_char='АБВ'; The same, ABW
$window->document->write($htmlified_char); # works!
</SCRIPT>
</BODY>
</HTML>
I think I've browsed the complete documentation of AS Perl as far
as it is at least remotely related to either Unicode or WSH; I've
been writing Perl code for Linux which successfully digests thousands
of lines of utf8-encoded text in the wildest array of languages
(e.g., Mongolian, Arabic, Chinese, Tibetan all in one document)
and it works. However I fail to understand where to search for a
solution to the above-mentioned problem.
Thanks for any hints,
Oliver.
I try to put utf8 material into a browser page via a Perl script
embedded in an HTML page. The whole thing runs under Windows XP
Professional, I am using ActivePerl 5.8.0 and IE 6.0. A minimal
file exhibiting the problem is given here:
<HTML>
<HEAD>
<TITLE>PerlScript Minimal Test</TITLE>
</HEAD>
<BODY>
<H2>A Chinese Character: 一</H2><!-- test, works well -->
<SCRIPT LANGUAGE="PerlScript">
use utf8; # Doesn't seem to make any difference here
#
$abwwide="\x{0410}\x{0411}\x{0412}" # Cyrillic ABW
$window->document->write($abwwide); # Doesn't work
#
$abw ="ÐБВ" # Again Cyrillic ABW, but in utf8
$window->document->write($abw); # Doesn't work
#
# Direct approach
$window->document->write("ÐБВ"); # doesn't work, either
#
$htmlified_char='АБВ'; The same, ABW
$window->document->write($htmlified_char); # works!
</SCRIPT>
</BODY>
</HTML>
I think I've browsed the complete documentation of AS Perl as far
as it is at least remotely related to either Unicode or WSH; I've
been writing Perl code for Linux which successfully digests thousands
of lines of utf8-encoded text in the wildest array of languages
(e.g., Mongolian, Arabic, Chinese, Tibetan all in one document)
and it works. However I fail to understand where to search for a
solution to the above-mentioned problem.
Thanks for any hints,
Oliver.