Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: LWP::Simple is it get decoded or not ?

by rpnoble419 (Pilgrim)
on Aug 10, 2012 at 13:28 UTC ( #986741=note: print w/ replies, xml ) Need Help??


in reply to LWP::Simple is it get decoded or not ?

Uncode support changed in Perl 5.10 from the way it was handled in 5.8.8. Look at http://perldoc.perl.org/perlunicode.html for more information


Comment on Re: LWP::Simple is it get decoded or not ?
Re^2: LWP::Simple is it get decoded or not ?
by remiah (Hermit) on Aug 10, 2012 at 22:52 UTC
    thanks for reply rpnoble419.

    I will read through perluniintro, perlunicode anyway. This time, really.

    i became a little bit nervous for decoding, encoding way of each modules now.

    dbd::sqlite gives me decoded character if i set sqlite_unicode to 1, but they seems automatically encode characters to bytes when i put characters to database regardless of sqlite_unicode switch. it gives me no warnings when i put decoded characters to databases when i don't use sqlite_unicode. i thought dbd::ado gave me warning... wasn't it ?

    when i pass decoded characters to template toolkit, i pass binmode switch to proccess function. For "decoding" template file it self, I am using Template::Provider::Encoding.

    And now LWP::Simple... It seems I am stumbling all unicode stones.

Re^2: LWP::Simple is it get decoded or not ?
by remiah (Hermit) on Aug 11, 2012 at 04:07 UTC

    It was version difference of LWP::Simple to get decoded character or not decoded bytes.

    5.810 of LWP::Simple doesn't use decoded_content() but it uses content() method. On the other hand 5.835 uses decoded_content() method, so it returns decoded character.

    I decided to use useragent and decoded_content explicitly, to work with each enviornment. Below is test script with LWP::Simple 5.810

    thanks a lot.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2014-07-29 23:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls