Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: How to Remove Junk Characters

by abcde (Scribe)
on Jan 05, 2006 at 13:33 UTC ( #521199=note: print w/replies, xml ) Need Help??

in reply to How to Remove Junk Characters

I am not sure what you mean by "junk" characters. May you post an example of what you mean?

I took out the proxy lines and ran the code; the file downloaded without any errors. However, I think you are referring to accented characters such as ö in the source - Use HTML::Entities if you want to encode them into the proper ö format.

But please post an example so we can be sure of what you want.


Replies are listed 'Best First'.
Re^2: How to Remove Junk Characters
by Rajeshk (Scribe) on Jan 06, 2006 at 05:47 UTC

    Hi Monks,

    Here are some sample junk characters Downloaded files Input -- Original Output =========================================== 1. jury trial. For his -- jury trial. For his 2. Börries Ahrens -- Börries Ahrens 3. Aldejohann’s main -- Mr. Aldejohann’s 4. University of MĂĽnster -- University of Münster 5. the €625 million senior and €130 -- €625 million senior and €1 +30 6. acquisition of a properties’ -- acquisition of a properties’ 7. Westfield College – University -- Westfield College – University + 8. TelĂ©fonos -- Teléfonos 9.(CelumĂłvil S -- (Celumóvil S 10. Dr. jur., 1990, with a dissertation on “Die Unabhängigkeit des +genossenschaftlichen PrĂĽfungsverbandes” (“The Independence of th +e Cooperative Inspection Association”) --- Dr. jur., 1990, with a dissertation on "Die Unabhängigkeit des genosse +nschaftlichen Prüfungsverbandes" ("The Independence of the Cooperativ +e Inspection Association")


      my $file_cnt = $res->content;
      my $file_cnt = $res->decoded_content;

      See HTTP::Message for an explanation of the difference.

      Many thanks to the search artist kwapping for finding it and to tye for explaining it :-)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2023-12-05 18:56 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (27 votes). Check out past polls.