Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: Perl Encoding/Decoding Doubt: From a Novice

by Khen1950fx (Canon)
on Jul 04, 2013 at 16:11 UTC ( #1042484=note: print w/replies, xml ) Need Help??

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

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?

Replies are listed 'Best First'.
Re^4: Perl Encoding/Decoding Doubt: From a Novice
by Anonymous Monk on Jul 05, 2013 at 04:23 UTC

    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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042484]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2018-04-20 20:28 GMT
Find Nodes?
    Voting Booth?