trilium
trilium copied to clipboard
(Bug report) ZIP file insert to note , Chinese in file name show random code
Trilium Version
0.51.2
What operating system are you using?
Windows
What is your setup?
Local (no sync)
Operating System Version
windows11 21H2
Description
ZIP file insert to note , Chinese in file name show random code.
but character in txt show normally.
show in picture below.
the zip file is :
Hi. Unfortunately, this is due to the fact that the ZIP file format does not preserve file name encoding. The file name was encoded in GB18030 while Trilium expects UTF-8, causing decoding errors.
If you don't need to view the archive in notes, you can always use other encoding-preserving formats such as 7zip. Otherwise, it's highly suggested to use only letters and numbers for file names.
Update: share for you. Use PeaZip to zip files, then import filename or filetree with chinese into note, the filename and filetree shows correctly.
I solved this issue using 7zip to zip the file. I'm using macOS and ubuntu trilium server.