File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ 0.1.10
2+ ======
3+ :release date: NOT RELEASED YET
4+
5+ New feature
6+ -----------
7+ * Add ``encoding `` and ``unicode_erros `` option to packer and unpacker.
8+ When this option is specified, (un)packs unicode object instead of bytes.
9+ This enables using msgpack as a replacement of json.
10+
1110.1.9
212======
313:release date: 2011-01-29
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ cdef class Packer(object):
120120 ret = msgpack_pack_raw_body(& self .pk, rawval, len (o))
121121 elif PyUnicode_Check(o):
122122 if not self .encoding:
123- raise TypeError (" Can't pack unicode object: No encoding is specified" )
123+ raise TypeError (" Can't encode utf-8 no encoding is specified" )
124124 o = PyUnicode_AsEncodedString(o, self .encoding, self .unicode_errors)
125125 rawval = o
126126 ret = msgpack_pack_raw(& self .pk, len (o))
You can’t perform that action at this time.
0 commit comments