String with unicode fails during put
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
etcd3gw |
New
|
Undecided
|
Unassigned |
Bug Description
Create a file with 'En DASH' (\u2013)
$ cat >input.txt<<EOF
\s+–\s
EOF
Put the file to etcd
$ cat >save.py<<EOF
from etcd3gw.client import Etcd3Client
with open("input.txt", "r") as file:
data = file.read()
client = Etcd3Client(
client.
EOF
$ python3 save.py
Traceback (most recent call last):
File "/home/
client.
File "/home/
"value": _encode(value)
File "/home/
data = str(data)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 3: ordinal not in range(256)