Re: write smiley to file

2007-11-24 Thread Chas. Owens
On Nov 24, 2007 12:06 AM, Ken Perl <[EMAIL PROTECTED]> wrote: > I use following piece of code to write smiley Unicode string into a file, > > use Encode; > my $smiley = "\x{263a}"; > open my $out, ">:utf8", "file" or die "$!"; > print $out $smiley; > > however, if we dump the output file in binary

Re: write smiley to file

2007-11-24 Thread Tom Phoenix
On 11/23/07, Ken Perl <[EMAIL PROTECTED]> wrote: > I use following piece of code to write smiley Unicode string > into a file, > > use Encode; > my $smiley = "\x{263a}"; > open my $out, ">:utf8", "file" or die "$!"; > print $out $smiley; > > however, if we dump the output file in binary mode, the

write smiley to file

2007-11-23 Thread Ken Perl
I use following piece of code to write smiley Unicode string into a file, use Encode; my $smiley = "\x{263a}"; open my $out, ">:utf8", "file" or die "$!"; print $out $smiley; however, if we dump the output file in binary mode, the hex looks wrong, it isn't 263a, any idea what's wrong with the co