[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error : Invalid byte 2 of 3-byte UTF-8 sequence



Hi Alain,

> 
> I try to use it to consume a Web Service and I have this error :
> "Invalid byte 2 of 3-byte UTF-8 sequence"
> 

I don't understand it, either.   I do want to point out that this 
message is being returned from the web service.  It is not issued by 
your program or HTTPAPI.  In fact, it proves that HTTPAPI is doing it's 
job correctly -- the web service is sending you a message, and you're 
receiving it, and that's HTTPAPI's job.

But, I don't understand the message.   How can you have an invalid byte 
of a UTF-8 sequence when you aren't sending UTF-8 to begin with?

Possibly the web service is confused?  Maybe it thinks you're sending 
UTF-8, even though you've told it that the data is iso-8859-1?  Maybe 
this is a bug in the web service and has nothign to do with your code? 
Since SoapUI would've used UTF-8, it probably didn't encounter the error.

You might consider using UTF-8 instead of iso-8859-1 and see if that 
solves the problem.   Make sure you call HTTP_SetCCSIDs() to tell 
HTTPAPI to translate your EBCDIC data to CCSID 1208 (which is UTF-8). 
By default it'll translate to 819 (which is iso-8859-1).
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------