thank you very much for the tips

--- On Tue, 4/28/09, Brian Raven <bra...@nyx.com> wrote:

From: Brian Raven <bra...@nyx.com>
Subject: Re: [Perl-unix-users] Need Help on Japanese Character
To: perl-unix-users@listserv.ActiveState.com
Date: Tuesday, April 28, 2009, 7:42 PM

From: perl-unix-users-boun...@listserv.activestate.com
[mailto:perl-unix-users-boun...@listserv.activestate.com] On Behalf Of
Jewel Nuruddin
Sent: 28 April 2009 07:22
To: perl-unix-users@listserv.ActiveState.com; Martin (IS)Thurn
Subject: Re: [Perl-unix-users] Need Help on Japanese Character

> Hi
> Can anyone please tell me what is the worng in my following perl code
> 
> use Jcode;
> push(@body, Jcode::convert(@log, 'utf8'));
> 
> @log contain some japanese text

According to the documentation (see 'perldoc Jcode'), Jcode::convert
expects its first parameter to be the scalar string to convert, but you
are passing an array. So, you will need to convert the strings in @log
one at a time. For example the following might be better:

push @body, Jcode::convert($_, 'utf8') foreach @log;

HTH

-- 
Brian Raven 
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



      
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to