in reply to Re: Perl Encoding/Decoding Doubt: From a Novice
in thread Perl Encoding/Decoding Doubt: From a Novice

I tried the coding you provided, but I get the below output.

Çirçös Çirçös—

If it helps, I am using Windows: Windows 7 Professional 32-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.130318-1533)

Replies are listed 'Best First'.
Re^3: Perl Encoding/Decoding Doubt: From a Novice
by Khen1950fx (Canon) on Jul 04, 2013 at 16:11 UTC
    My bad. I was thinking of Linux. How about this:
    #!/usr/bin/perl -l use warnings; use strict; use Encode qw(encode_utf8); $| = 1; binmode STDIN, ":encoding(UTF-8)"; my $str = 'Çirçös'; $str = encode_utf8($str); print "$str"; my $str1 = 'Çirçös—'; $str1 = encode_utf8($str1); binmode STDOUT, ":encoding(UTF-8)"; print "$str1";
    I'm on Fedora, so I'm flying blind. Does that help?

      It still doesn't work.

      I tried the below coding as well, but to no avail.

      use open ':std' => ':locale'; # Error: Cannot figure out an encoding to use

      Windows doesn't seem to accept the above coding as well.

      Now, should I go about changing those characters to HTML entities in Microsoft Word itself and then try doing the conversion, in which case there shouldn't be any problem.

      But I am still hopeful there is another way