add escape char and convert unicode