Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^4: how to output file in Unicode

by anakin30 (Acolyte)
on Aug 27, 2012 at 11:10 UTC ( #989961=note: print w/replies, xml ) Need Help??

in reply to Re^3: how to output file in Unicode
in thread how to output file in Unicode

I have written this script below,

the output file generated but i still seeing, German "Umlaut" in the csv output file. Example : Björn

why the csv output file is not encoded into encoding(UTF-8)??, am i missed any steps here!!!!

#!/usr/bin/perl use Net::LDAP; use Encode; $outputfile = 'C:\Meta\MDS\data\out\LicMan1.csv'; $outputfile2 = 'C:\Meta\MDS\data\out\LicMan.csv'; open (INPUT, "<:encoding(UTF-8)", $outputfile) or die "Cannot open fil +ename for input: $!"; while (<INPUT>) { s/"//g; $replace .= $_;} close INPUT or die "Cannot close filename: $!"; open (OUTPUT, ">:encoding(UTF-8)",$outputfile2) or die "Cannot open fi +lename for output: $!"; print OUTPUT $replace; close OUTPUT or die "Cannot close filename: $!";

Replies are listed 'Best First'.
Re^5: how to output file in Unicode
by philiprbrenan (Monk) on Aug 27, 2012 at 19:46 UTC


    my $s = "\x{fc}"; say $s; say $s =~ s/\x{fc}/u/gr;

    You can see common unicode points at: amongst many other places on the web.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2017-08-23 17:44 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (355 votes). Check out past polls.