Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: question about Encode::decode('iso-8859-1', ...)

by borisz (Canon)
on Mar 07, 2009 at 02:08 UTC ( #749003=note: print w/ replies, xml ) Need Help??


in reply to question about Encode::decode('iso-8859-1', ...)

No.
But test($x) may return 1 if you use 'utf8' instead of 'iso-8859-1'.

Boris


Comment on Re: question about Encode::decode('iso-8859-1', ...)
Replies are listed 'Best First'.
Re^2: question about Encode::decode('iso-8859-1', ...)
by perl5ever (Pilgrim) on Mar 07, 2009 at 02:23 UTC
    thanks, but do you mean "may return 0 ..." instead of "may return 1 ..." ?

      Well, it can return both :)

      It can return zero for any encoding other than US-ASCII and iso-8859-1.

        Don't think so. Could you provide an example?

        For "any encoding other than US-ASCII and iso-8859-1" to matter while decoding, you'd need wide characters, in which case Perl will croak with "Wide character in subroutine entry at .../Encode.pm line..." before returning anything. Any non-wide characters will simply be treated as iso-8859-1, because decode('iso-8859-1',...) is telling Perl they are.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://749003]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2015-07-07 23:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls