Titprem has asked for the wisdom of the Perl Monks concerning the following question:
I would like to encode it in UTF8, with the perl script below (perl v5.10.1) :Crèvecœur Œ Æ æ
But in the output file (utf.txt), the œ ligature is encoded "0xC2 0x9C" (and thus is not printed) instead of "0xC5 0x93" ! The same for the Œ. But other ligatures (Æ et æ) are properly encoded ! Where is the bug ? Thanks !use Encode; open(my $iso,'<:encoding(iso-8859-15)','iso.txt'); open(my $utf,'>:utf8','utf.txt'); while(<$iso>){ print $utf $_; } close($utf); close($iso);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with œ / Œ ligature encoding
by choroba (Cardinal) on Jun 15, 2015 at 17:20 UTC | |
|
Re: Problem with œ / Œ ligature encoding
by tonto (Friar) on Jun 15, 2015 at 17:43 UTC | |
by Titprem (Initiate) on Jun 15, 2015 at 18:01 UTC | |
|
Re: Problem with œ / Œ ligature encoding
by Anonymous Monk on Jun 15, 2015 at 17:21 UTC |