Closed josb closed 5 years ago
I think '--data-binary' option would solve that for you (thanks to @mariosotil).
Post back if you still see on issue.
This released in v0.13, which was just published to https://pypi.org/project/awscurl
That worked, thanks @okigan !
The default encoding in Python 2.x is
ascii
so we are seeing the following backtrace when supplying UTF-8 arguments to the--data
flag:The fix seems to be to avoid the implicit call to
decode(<default encoding>)
when dealing withval
being of typestr
, by explicitly decodingval
asutf-8
first so we end of with aunicode
object to feed toencode('utf-8')
, like it expects.Hence the fix looks like this: change
to