Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

docmd.close 2585, WWWXXXAPC, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text, how to setup procmail html2text, WWWXXXAPC., XXXCNZZZ

Links

XODOX
Impressum

#1: Returns of Encode::decode / guess_encoding ?

Posted on 2007-10-02 16:02:35 by pkaluski

Hello,

Does anyone know what's the return of Encode::decode(), guess_encoding(), and Encode::Guess->guess() ?

Like $my_guess = guess_encoding($mystring, qw/big5/);
die $my_guess unless ref($my_guess);

Then it prints out "big5-eten or cp936 at c:\myproject\....."

I want to catch this "big5-eten" and "cp936" word. So that I can use it to {try to} decode with it...

How Can I do that? Thanks


Thanks for everyone's help :)

Report this message

#2: Re: Returns of Encode::decode / guess_encoding ?

Posted on 2007-10-02 17:52:12 by paduille.4061.mumia.w+nospam

On 10/02/2007 09:02 AM, 地球人 wrote:
> Hello,
>
> Does anyone know what's the return of Encode::decode(), guess_encoding(), and Encode::Guess->guess() ?
>
> Like $my_guess = guess_encoding($mystring, qw/big5/);
> die $my_guess unless ref($my_guess);
>
> Then it prints out "big5-eten or cp936 at c:\myproject\....."
>
> I want to catch this "big5-eten" and "cp936" word. So that I can use it to {try to} decode with it...
>
> How Can I do that? Thanks
>
>
> Thanks for everyone's help :)
>

According to the documentation for Encode::Guess,
Encode::decode("Guess",...) returns an anonymous subroutine if it
succeeds, and it returns a string error message if it fails.

The same is true of guess_encoding and Encode::Guess->guess.

Report this message