trilium icon indicating copy to clipboard operation
trilium copied to clipboard

(Bug report) ZIP file insert to note , Chinese in file name show random code

Open zomboo opened this issue 2 years ago • 3 comments

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. image the zip file is : image

zomboo avatar May 23 '22 04:05 zomboo

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.

dousha avatar May 23 '22 10:05 dousha

Update: share for you. Use PeaZip to zip files, then import filename or filetree with chinese into note, the filename and filetree shows correctly.

zomboo avatar May 24 '22 05:05 zomboo

I solved this issue using 7zip to zip the file. I'm using macOS and ubuntu trilium server.

Zhen3r avatar Aug 17 '22 02:08 Zhen3r