mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
Correcting 'utf-8' to 'unicode'.
This commit is contained in:
parent
ac713705eb
commit
b764169775
1 changed files with 2 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ cdef class Packer(object):
|
|||
ret = msgpack_pack_raw_body(&self.pk, rawval, len(o))
|
||||
elif PyUnicode_Check(o):
|
||||
if not self.encoding:
|
||||
raise TypeError("Can't encode utf-8 no encoding is specified")
|
||||
raise TypeError("Can't encode unicode string: no encoding is specified")
|
||||
o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors)
|
||||
rawval = o
|
||||
ret = msgpack_pack_raw(&self.pk, len(o))
|
||||
|
|
@ -425,3 +425,4 @@ cdef class Unpacker(object):
|
|||
|
||||
#def _off(self):
|
||||
# return self.buf_head
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue