in reply to Problem with Writing French Accented Characters in Excel using Perl!
Looks like your Excel doesn't understand UTF-8 encoded strings. So, you could try to convert your $temp into one of the other likely candidate encodings, which are "UCS-2LE" (or "UTF-16LE" for that matter... though Windows more often uses UCS-2), or "cp1252" (the Windows variant of the legacy encoding "iso-8859-1").
In other words, before you set your cell's value, insert a line
$temp = encode("UCS-2LE", $temp);
or
$temp = encode("cp1252", $temp);
and see if that helps...
The routine encode() is from the module Encode, so you'll need to add "use Encode qw(encode);" somewhere near the beginning of the script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with Writing French Accented Characters in Excel using Perl!
by shintu (Initiate) on Sep 06, 2007 at 14:11 UTC | |
|
Re^2: Problem with Writing French Accented Characters in Excel using Perl!
by Anonymous Monk on Sep 06, 2007 at 14:08 UTC |