Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot, bind-address mysql multiple, sanibleone xxxx, ftp://192.168.100.100/, www.xxxcon, which comes first ob_start or session, wwwxxx/58/2010

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