[[ Bug 13658 ]] Data corrupted by the shell() function on server

I think we need to keep the existing behavior here in 'text mode' - in that mode either real EOF or numToChar(4) should cause eof.