escape invalid characters even for US-ASCII string.