Re: Problem with Encoding

2005-02-18 Thread David Cantrell
John Delacour wrote: At 12:33 pm + 18/2/05, David Cantrell wrote: First of all iso-8859-1 does not contain the Euro sign. The character set you probably intend is Windows-1252 No he doesn't, he wants iso-8859-15 I doubt it very much If he says he wants ISO 8859 1 and he says he wants the Euro

Re: Problem with Encoding

2005-02-18 Thread John Delacour
At 12:33 pm + 18/2/05, David Cantrell wrote: First of all iso-8859-1 does not contain the Euro sign. The character set you probably intend is Windows-1252 No he doesn't, he wants iso-8859-15 I doubt it very much, but you seem to have inside information. #!/usr/bin/perl -w use Encode; $euro =

Re: Problem with Encoding

2005-02-18 Thread David Cantrell
John Delacour wrote: At 7:32 pm +0100 17/2/05, Philippe de Rochambeau wrote: I am trying to convert MacRoman encoded text to iso-8859-1... The input file, data.txt contains the following string: Les éléphants sont arrivés. First of all iso-8859-1 does not contain the Euro sign. The character set

Re: Problem with Encoding

2005-02-17 Thread John Delacour
At 7:32 pm +0100 17/2/05, Philippe de Rochambeau wrote: I am trying to convert MacRoman encoded text to iso-8859-1. The script below show what I am trying to do. The input file, data.txt contains the following string: Les éléphants sont arrivés. First of all iso-8859-1 does not contain the Euro

Re: Problem with Encoding

2005-02-17 Thread Sherm Pendley
On Feb 17, 2005, at 1:32 PM, Philippe de Rochambeau wrote: use encoding "MacRoman"; #, STDIN => "MacRoman", STDOUT => "iso-8859-1"; You've specified STDOUT as 8859-1... open FH, ">data2.txt" or die "$!"; print FH "$data"; But you're not printing to STDOUT. Try opening FH like this: open FH, '>:enc

Problem with Encoding

2005-02-17 Thread Philippe de Rochambeau
Hello, I am trying to convert MacRoman encoded text to iso-8859-1. The script below show what I am trying to do. The input file, data.txt contains the following string: Les éléphants sont arrivés. € When I run the script, I get the following string, which is utf-8 and not iso-8859-1, in the data