I'm writing a script that needs to list file entries from a zip file. My problem is that when there is an entry with an emoji, and the CLI doesn't output the file name correctly:
❯ zip -r foo.zip test/
adding: test/ (stored 0%)
adding: test/.txt (stored 0%)
src on main [!?] is v1.0.0 via v16.14.0
❯ unzip -l foo.zip
Archive: foo.zip
Length Date Time Name
--------- ---------- ----- ----
0 04-08-2022 20:54 test/
0 04-08-2022 20:54 test/�???.txt <---- here is my problem
--------- -------
0 2 files
src on main [!?] is v1.0.0 via v16.14.0
❯ unzip foo.zip test/.txt
Archive: foo.zip
extracting: test/�???.txt
Is there a way to tell unzip to list the file entries with consideration of special characters?
Thanks!