Modify escaping sequences for encoding