Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send a string with null byte via a XMLHTTPRequest Post

Status
Not open for further replies.

ajaxnewbie

Programmer
Jul 11, 2008
3
Hi Everyone,

Is it possible to send a string with null bytes using XMLHTTPRequest POST? The string is passed on to the Javascript from a java applet.

At the moment, XHR is assuming the null byte as a string terminator and dumping everything after the null byte.

The server thats expecting the string doesnt allow encoding into any format.

Thanks a lot,
Sanj.
 
If the server can handle the 'null byte' after decoding, then you can encode the byte as a numeric entity. Perhaps something like:
Code:
�

Here is the specification for numeric entities in XML.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top