diff options
author | Dave Nicolson | 2023-11-24 14:05:05 +0100 |
---|---|---|
committer | Nikias Bassen | 2023-11-26 12:38:04 +0800 |
commit | d1d2d36791a7674bae7286c003a82e36ece008ab (patch) | |
tree | f0e6f9c935b941d9423051b83d005cd356faa508 | |
parent | 73b4b2d2e851b6042a4b2ac4b1d473aeabf3214c (diff) | |
download | libplist-d1d2d36791a7674bae7286c003a82e36ece008ab.tar.gz libplist-d1d2d36791a7674bae7286c003a82e36ece008ab.tar.bz2 |
Fix Cython dump method
-rw-r--r-- | cython/plist.pyx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cython/plist.pyx b/cython/plist.pyx index 5481308..8029995 100644 --- a/cython/plist.pyx +++ b/cython/plist.pyx @@ -977,8 +977,10 @@ cpdef object dumps(value, fmt=FMT_XML, sort_keys=True, skipkeys=False): node = Dict(value) elif type(value) in (list, set, tuple): node = Array(value) + else: + node = value if fmt == FMT_XML: - return node.to_xml() + return node.to_xml().encode('utf-8') return node.to_bin() |