glance icon indicating copy to clipboard operation
glance copied to clipboard

Support for Unicode characters in archive file names

Open Treldo opened this issue 4 years ago • 4 comments

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.

Treldo avatar May 28 '20 11:05 Treldo

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?

samuelmeuli avatar May 28 '20 16:05 samuelmeuli

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

Treldo avatar May 29 '20 01:05 Treldo

Thanks for testing this.

  • ZIP: If zipinfo can be configured to output the correct file name, I will update the command used by Glance.

  • TAR: As you said, the tar command displays the file name correctly. What's weird is that if I run the command from the main app, the Chinese characters are displayed correctly, but if I run it from the Quick Look plugin, the output is SQL\\346\\225\\260\\346\\215\\256\\347\\256\\241\\347\\220\\206\\344\\270\\216\\346\\237\\245\\350\\257\\242.pdf.

samuelmeuli avatar May 29 '20 10:05 samuelmeuli

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 !

FabSugoi avatar Jun 02 '20 11:06 FabSugoi