[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: utf-8 and length
HTTPAPI does not currently support double-byte EBCDIC characters. It
assumes that every EBCDIC character is exactly one byte long.
I've never worked in an environment where double-byte characters are used.
I've never been trained in how to use them. I don't have access to a
double-byte character system to test the code, even if I had a clue how to
write it. :)
This leaves you with two choices:
a) You can call HTTP_url_post_raw2(), which does absolutely no
translation, and do all of the translation and XML parsing yourself.
b) You can change CCSIDR4 to support double-byte EBCDIC, and change
everything that calls it, test it, and contribute it back to the project.
--
Scott Klement http://www.scottklement.com
On Thu, 31 Aug 2006, Shahar Mor wrote:
> Hi all,
>
> I am using HTTPAPI to call webservices from RPG , it works very well and
> fast with several services. recently Encountered an issue with UT8 and
> non english characters as followes:
>
> say my ebcdic string is abb*** (where * = character that is double byte
> in utf-8) this is 6 bytes
>
> my utf-8 string will become 9 bytes (the * will become 2 character for
> each *)
>
> however post_xml will calculate string as 6 bytes and not 9 bytes thus
> truncating my message and creating invalid xml document.
>
> I think we need to update the code and let it calculate actual length
> after conversion, but not sure.
>
>
> Can someone smarter then myself take alook at it ?
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------