Hello to everybody,

I have a problem with dealing with unicode in a Perlscript embedded in
ASP. If I take the following script, himself written and saved in utf-8 :

--------------------

<[EMAIL PROTECTED]"PerlScript" CODEPAGE=65001 %>

<%
$Response->SetProperty('ContentType','text/html');
$Response->SetProperty("CharSet","65001");
$Response->SetProperty("CodePage","65001");
$Session->SetProperty("CodePage","65001");

$Response->Write("ééàà\x{00E9}");
$Response->Write("ééàà\x{00E9}\x{0253}");


my $filename_in = "test.txt";

open(FH, "<:utf8", $filename_in ) or die("Fichier introuvable");
  while ($ligne=<FH>) {
    $Response->Write($ligne);
  };
close(FH);

%>

--------------------


The first Response->Write works ok,
The second give a bad result : ééà à éÉ\u201c

The output of test.txt file, in utf-8 format, is bad, too. It is
misinterpreted in the same way as the second response->write. 

So it seems that Perlscript supports basic Unicode (codepoint under
00FF) in literal strings, but as soon as I put characters over 00FF
or if I want to read and display an utf-8 encoded file, problems
appear.

Do you have any idea of what I missed ? Or is it a definitive problem
with ASP support of Unicode ?

Thanks in advance for any idea,

Julien Barnier

_______________________________________________
Perl-Win32-Web mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to