Skip to content

Commit 42031bc

Browse files
author
renaud gaudin
committed
Charset-aware default mimetype for metadata
Specify the charset (UTF-8) in the default mimetype for add_metadata() so that readers can display them properly.
1 parent beb81d2 commit 42031bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libzim/libzim.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ cdef class _Creator:
278278
with nogil:
279279
self.c_creator.addItem(item)
280280

281-
def add_metadata(self, str name, bytes content, str mimetype = "text/plain"):
281+
def add_metadata(self, str name, bytes content, str mimetype = "text/plain;charset=utf-8"):
282282
if not self._started:
283283
raise RuntimeError("ZimCreator not started")
284284

0 commit comments

Comments
 (0)