Exported pdf text layer has wrong encoding

When I export to PDF via the File->Export->Pdf… menu the text layer (that can be copied from the PDF) is in cp1252 (or ISO 8859-2) encoding not utf8 which makes the text wrong. (Document language is set to Slovak).
This happens when in the convert->pdf menu I check produce Pdf using native export filter.

It seems like there is some encoding issue in the pdf humus printer.

How do I fix this?

The encoding is also wrong when I export to LaTeX with the option UTF8 + inputenc.

The ghostscript pdf exporter produces a valid text layer but the resulting pdf has errors.

The produced file seems to have /WinAnsiEncoding set as base encoding which is windows-1252 instead of utf8

I seem to have managed to make it work by turning of the Use native export filter in the convert->pdf menu
and by replacing all images with PDF images.

The pdf writer hummus inserts the wrong encoding for the text layer and the gs writer cannot handle non pdf images because qt5 cannot convert them to postscript.

Hm, weird. Would it be possible for you to upload the file so that I can try to reproduce it?

Source file: texmacs-pdf-test.tm
Ghostscript export: texmacs-pdf-test.pdf
Native export (pdfhummus): texmacs-pdf-test-native-exporter.pdf