in reply to Re^9: Cannot access HTTP::Response content properly
in thread Cannot access HTTP::Response content properly

Sorry for the confusion. If you go back to the very beginning of this thread, you will see that my last explanation is why we are at this point. I was trying to properly see the output of the Perl script. I couldn't, so I tested it out by writing the output to a file from within the Perl script. I thought it didn't work at first. However, I discovered that it did except with all kinds of character encoding. I guess what is happening, is the encoding issue you are talking about is somehow interfering with my C program's ability to capture and/or display the output from the Perl script of which I am calling. In a nutshell I want to:
1) call my perl script from my C program, 2) Perl script then issues a HTTP GET request, returns and prints out result, 3) C program captures this output that was printed to stdout

I have steps 1 and 2 working. However, thanks to you, I have discovered that I have some kind of hurdle here with the character encoding that is preventing #3 and I don't know what to do now.

  • Comment on Re^10: Cannot access HTTP::Response content properly

Replies are listed 'Best First'.
Re^11: Cannot access HTTP::Response content properly
by ikegami (Patriarch) on Nov 03, 2009 at 21:00 UTC

    The server sent you a document. You obtain it using ->decoded_content(charset => 'none'). You seem to think there's something wrong with the document. To fix it requires knowing why you think the document is wrong, and what kind of of document it is in order to fix it.

      Sorry. The document is just a simple ASCII text file in Linux. I made sure that the webserver EXPLICITLY set the content type to "text/plain"

        We were talking about a UTF-16be document, not an ASCII one
Re^11: Cannot access HTTP::Response content properly
by ikegami (Patriarch) on Nov 03, 2009 at 21:05 UTC

    In a nutshell I want to: 1) call my perl script from my C program, 2) Perl script then issues a HTTP GET request, returns and prints out result, 3) C program captures this output that was printed to stdout

    Then make a post about that. Will you please stop changing the subject?

    The server sent you a document. You obtain it using ->decoded_content(charset => 'none'). You seem to think there's something wrong with the document.

    To fix it requires knowing why you think the document is wrong, and what kind of of document it is in order to fix it.

      Sorry for the bother. I'll leave you alone now. I didn't really change the subject if you look at my original post. Thank you for your help.

        You said that the UTF-16be needed to be "taken care of". I've been trying helping you with that, yet none of your answers remotely relate to that.

        And again. The parent post definitely does not explain why you think there's something wrong with the document.