Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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?


Comment on Re^3: Perl Encoding/Decoding Doubt: From a Novice
Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042484]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-30 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls