From d1d2d36791a7674bae7286c003a82e36ece008ab Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Fri, 24 Nov 2023 14:05:05 +0100 Subject: Fix Cython dump method --- cython/plist.pyx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() -- cgit v1.1-32-gdbae