はじめに
MacOS Catalinaには、文字コードがSJISで全角文字を含むzipファイルがfinderで解凍できないバグが存在し、2020年3月現在も修正されていません。
ターミナルを起動してもunzipを実行しても失敗します。解凍するためには ditto
コマンドを使用して解凍する必要があります。
読みたくない人向け最短コマンド
※ターミナルで zipファイル
と 解凍(コピー)先
を書き換えて実行
ditto -x -k zipファイル 解凍(コピー)先
オプション説明
-x
指定したzipファイルをアーカイブします
-k
PKZIPを使用してアーカイブします
参考
コマンドのヘルプが一番参考になります。
admin@Mac ~ % ditto -h
Usage: ditto [ <options> ] src [ ... src ] dst
<options> are any of:
-h print full usage
-v print a line of status for each source copied
-V print a line of status for every file copied
-X do not descend into directories with a different device ID
-c create an archive at dst (by default CPIO format)
-x src(s) are archives
-z gzip compress CPIO archive
-j bzip2 compress CPIO archive
-k archives are PKZip
--keepParent parent directory name src is embedded in dst_archive
--arch archVal fat files will be thinned to archVal
multiple -arch options can be specified
archVal should be one of "ppc", "i386", etc
--bom bomFile only objects present in bomFile are copied
--norsrc don't preserve resource data
--noextattr don't preserve extended attributes
--noqtn don't preserve quarantine information
--noacl don't preserve ACLs
--sequesterRsrc copy resources via polite directory (PKZip only)
--nocache don't use filesystem cache for reads/writes
--hfsCompression compress files at destination if appropriate
--nopreserveHFSCompression don't preserve HFS+ compression when copying files
--zlibCompressionLevel num use compression level 'num' when creating a PKZip archive
--password request password for reading from encrypted PKZip archive
https://macwiki.osdn.jp/wiki/index.php/OSXの固有コマンド#ditto_.E2.80.A6_.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB.E3.81.AE.E3.82.B3.E3.83.94.E3.83.BC.E3.82.84.E3.82.A2.E3.83.BC.E3.82.AB.E3.82.A4.E3.83.96.E3.81.AE.E4.BD.9C.E6.88.90.E3.83.BB.E5.B1.95.E9.96.8B
-> Apple公式からは消えてました。
https://www.dan.co.jp/cases/macosx/ditto.html
http://www.openspc2.org/reibun/bash/basic/018/index.html
最後に
これでツールをインストールすることなくWindowsから送られてきたファイルを解凍することができました。