[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
eXpat - Converting character data and losing spaces
Hello,
I'm pasting the code that I'm using for my characher data handler
in eXpat. The problem is that if the character data contains leading
spaces, they are not all preserved after converting from UCS-2 to type
character in the last line. Everything seems to work fine if there
are no leading spaces, and spaces within the data are preserved. But
leading spaces cause problems. It may just be a coincidence, but the
number of leading spaces seems to be cut in half when it's converted
to type character. Does anyone know why this is happening?
Thanks!
Bob Barnhart
Fremont Insurance Company
//====================================================================
=
// character data handler
//====================================================================
=
P chardata B
D chardata PI
D d likeds(stack)
D string 16383C const options(*varsize)
D len 10I 0 value
D data s 16383a varying
/free
if (len < 1);
return;
endif;
data = %char(%subst(string:1:len));
....
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------