django-rest-framework-yaml icon indicating copy to clipboard operation
django-rest-framework-yaml copied to clipboard

render and parse invalid char

Open TZanke opened this issue 7 years ago • 0 comments

I have a string containing a unicode control char (mail subject) unicode:\x88 utf-8: \xc2\x88

original MimeType: =?UTF-8?Q?=C2=88?=

Yaml Renderer creates the following line in restframework: subject: "\x88" (unicode)

The client side has no problem at all (yaml.dump), but the rest framework server on the other side has.

RuntimeError: ReaderError at /api/xyz/ unacceptable character #x0088: special characters are not allowed in "", position 123

pyyaml can dump but will not read content it creates.

I also installed the latest PyYaml master to fix this issue: https://github.com/yaml/pyyaml/issues/25 But nothing changes.

Any thoughts on this?

(Edit: After some hours debugging i updated this question. I think this is a PyYaml related problem. But ideas are welcome)

TZanke avatar Apr 24 '18 11:04 TZanke