handle escape codes split across reads
also handle splitting utf8 characters across reads