N
nigel
Hi,
I'm creating a French web site. I've used Dreamweaver to develop most
of the site and have simply typed the french with accents. This all
displays fine. I've used DreamWeaver to create a library object for
the menu of the site (to avoid having multiple copies of exactly the
same html). I've now uploaded the library object to my server in order
that a perl program can read the contents of that file and output a
page of html complete with the menu for the site, but here I've run
into a problem: the accented letters are being displayed incorrectly.
For example an 'é' (e with an acute accent) is being displayed as a
capital A with two dots over it folowed by the copyright symbol. This
only happens for the text that is being read from the library object
file, an e with an acute accent typed into the perl program and
printed directly displays correctly. So I think the problem must be
related to how I read and then write the library object file. Here is
my code:
#######################################################################
######################
# Open and read the contents of the headerMenu template...
open(INPUT, "../Library/headerMenuFr.lbi") ||
&printErrorMessage("Error 001 : Can't open the 'headerMenuFr' file in:
$program");
while(<INPUT>) {
push(@records1,$_);
}
close(INPUT)|| &printErrorMessage("Error 012 : Can't close the
'headerMenuFr' file in: $program");
# Now read through the header and print it...
$recnum = @records1;
for ($i=0; $i<$recnum; $i++) {
print $records1[$i];
}
#######################################################################
#####################
If anyone has any bright ideas as to what I'm doing wrong and how to
correct it, I'd like to hear them!
Thanks in advance,
Nigel
I'm creating a French web site. I've used Dreamweaver to develop most
of the site and have simply typed the french with accents. This all
displays fine. I've used DreamWeaver to create a library object for
the menu of the site (to avoid having multiple copies of exactly the
same html). I've now uploaded the library object to my server in order
that a perl program can read the contents of that file and output a
page of html complete with the menu for the site, but here I've run
into a problem: the accented letters are being displayed incorrectly.
For example an 'é' (e with an acute accent) is being displayed as a
capital A with two dots over it folowed by the copyright symbol. This
only happens for the text that is being read from the library object
file, an e with an acute accent typed into the perl program and
printed directly displays correctly. So I think the problem must be
related to how I read and then write the library object file. Here is
my code:
#######################################################################
######################
# Open and read the contents of the headerMenu template...
open(INPUT, "../Library/headerMenuFr.lbi") ||
&printErrorMessage("Error 001 : Can't open the 'headerMenuFr' file in:
$program");
while(<INPUT>) {
push(@records1,$_);
}
close(INPUT)|| &printErrorMessage("Error 012 : Can't close the
'headerMenuFr' file in: $program");
# Now read through the header and print it...
$recnum = @records1;
for ($i=0; $i<$recnum; $i++) {
print $records1[$i];
}
#######################################################################
#####################
If anyone has any bright ideas as to what I'm doing wrong and how to
correct it, I'd like to hear them!
Thanks in advance,
Nigel