Hi Kent,

> Though I haven't fully understood the problem and I'm also tired, so my tip
> could be a red herring.
>
> The good news is if you want to remove only 3 *bytes* from the string
> instead of 3 *characters* then that could be straight forward.
>
> And I believe ".\r\n" might be exactly 3 bytes regardless of unicode magics.
> ( That is, depending on what you're doing you could get away without the
> utf8 transformation, but I really don't know what I'm talking about now )

I agree with you - and it also explains what we are seeing in terms of
that certain data comes through clean, and others doesn't.  I too
expect that the *entire stream* is not encoded with UTF8 (even though
it should be).

In terms of removing the last three characters, that is not what is
causing the issue.  Even if I remove the substr and pass literally
$Body = $Response, the data is still corrupted once it goes out via
STDOUT.

What is also VERY strange to me is that for some reason when I just do
something simple like put a use Encoding into the script, everything
works fine.  Then half an hour later, or a day or two later, and it
stops working and starts becoming corrupt again.  And THIS is what has
my mind completely baffled.  I am the only one with access to the
servers (and code), and I am not even logged in on the machines when
this sudden "change" in behaviour happens.

This is however really urgent to me, and I am not by any means the
"expect" in terms of programming either.  As I've stated in one or two
private emails, I am willing to pay someone to look at the code and
fix this for us.  I'm not asking you to do my homework either - it's a
legitimate issue going on here in a semi big application (and it
worked fine for about a year and a half before all of a sudden just
acting up for some reason).  I won't be surprised if this is a OS
issue even.


-- 

Regards,
Chris Knipe

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to