samuelmeuli / glance

🔎 All-in-one Quick Look plugin
MIT License
962 stars 68 forks source link

Support for Unicode characters in archive file names #28

Open Treldo opened 4 years ago

Treldo commented 4 years ago

Hello,

Glance will cover the preview provided by other applications when the file type is archive, and it doesn't support to display Chinese characters. Do you have plan to support Chinese characters?

Thanks you.

samuelmeuli commented 4 years ago

Which archive types aren't working?

Glance internally uses the zipinfo and tar --gzip --list --verbose --file commands to list the contents of archives. Do you get the expected output with these commands?

Treldo commented 4 years ago

I use the commands to list the contents of archives.

If the archive type is zip,

filename: "SQL数据管理与查询.pdf" zipinfo in Terminal :

SQL??????管????????询.pdf
__MACOSX/._SQL??????管????????询.pdf

preview in Finder:

zip_preview

I can get the correct result in Terminal if the archive type is tar, but

preview in Finder:

tar_preview

samuelmeuli commented 4 years ago

Thanks for testing this.

FabSugoi commented 4 years ago

Hi Samuel, thanks for the great work on Glance ! I ran in the same issue trying to look through Japanese encoded files that shows "????" instead of the file content. It seems zipinfo on Mac lacks some functions to handle unicode and encoding (like the -U flag). tar -tf on the other hand list it correctly and also works with zip files. I've attached a screenshot for your kind reference. Capture d’écran 2020-06-02 à 13 54 15 Bonne journée !