Page 1 of 1

Opera doesn't understand the NULL byte :-\

Posted: Sun Aug 13, 2006 5:40 pm
by Chris Corbyn
I'm using AJAX and sending a result from the server as a delimited string. The delimiter I'm using is "\0" the NULL byte. The works fine in IE and FF which can split the string at '\0' but Opera just refuses to recognize it as a null byte :(

In PHP I'm sending it like this:

Code: Select all

exit($item1."\0".$items2."\0".$item3); //etc etc
And in the JS I'm doing:

Code: Select all

var parts = httpReq.responseText.split('\0');
I've switched to using the DELETE code \x7f instead which seems to work but I still don't get why it doesn't like the null byte :? Bug?

Posted: Sun Aug 13, 2006 6:19 pm
by Weirdan
in Opera 9b1 this does work as expected (when entered in address bar):
javascript:alert('asd\0sdf'.split('\0'))