When you send a string of single-byte chars, you must not use host-to-net conversion. Those conversions require only for short int ( 2 bytes ) or long ( 4 bytes ).
----- Original Message ----- From: "Marcel" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, December 19, 2003 7:36 AM Subject: NetLib Socket connection to a Java Servlet > I made a NetLib TCP/IP connection to a Java Server Socket on a different > host in the LAN. The establishment of the connection works fine, also the > Palm can send all of the data bytes through the socket. The only problem is > that on the destination Java socket , the data that is received looks like > this: à[À Ía¦ àp > Originally, the string transmitted by the Palm was "GET /index.html > HTTP/1.0". Why is it getting messed up while being transmitted ? > > I thought it must be the character encoding, but even when I use > TxtConvertEncoding() to convert from ASCII to UTF16 (used by Java) before > sending the data, it doesn't help. > I also do a NetHToNS before I send the data. > > Does anybody have an advice ? > > Thank you. > Marcel. > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/