Bug 470724

Summary: Okular can't save .cbz files with non-english characters in their filename as .okular on Windows
Product: [Applications] okular Reporter: Archenoth <archenoth>
Component: Comicbook backendAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 23.04.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The empty .okular file emitted from attempting to save a cbz file under Windows
A minimal cbz that triggers the bug

Description Archenoth 2023-06-06 22:07:07 UTC
Created attachment 159505 [details]
The empty .okular file emitted from attempting to save a cbz file under Windows

SUMMARY
When attempting to save a .cbz file with annotations on Windows 11 as an .okular file, the resulting file is blank (attached)

I can also confirm that following the same steps on Linux with the same version of Okular and the same .cbz succeeds as expected, as does saving a .pdf as an .okular file on Windows

STEPS TO REPRODUCE
1. Open a .cbz in Okular on Windows
(If you don't have one, zipping some PNGs and renaming the .zip to a .cbz should do the trick!)
2. File -> Save As, and save as an .okular file

OBSERVED RESULT
An empty .okular file is produced

EXPECTED RESULT
An .okular file containing the saved document is produced, along with annotations and other things like that!

SOFTWARE/OS VERSIONS
Windows: 11 Pro (10.0.22000 Build 22000)
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
I am using the version that was installed from the Microsoft Store here: https://apps.microsoft.com/store/detail/okular/9N41MSQ1WNM8
Comment 1 Archenoth 2023-06-06 22:39:53 UTC
Created attachment 159506 [details]
A minimal cbz that triggers the bug

Oh!
I actually figured out another important factor when trying to make a minimal test file!
It seems to only break when the filename has non-english characters in it

So a workaround currently is to rename your files to only have ASCII filenames

Also, the PDF I tested earlier did not have any non-ascii characters in it, and when I tried it with one that did, Okular actually still emits a file that isn't empty, but still fails to reopen it

So this might actually be the intersection of two distinct problems, one with the comic book format, and one with file handling on Windows in general maybe?