LoginSignup
1
0

More than 5 years have passed since last update.

linuxでzipファイルを解凍するとファイル名が文字化けしてしまう対策

Last updated at Posted at 2017-04-11

(windowsで圧縮したファイルをlinuxで解凍すると発生する)

sjis対応版のunzipをインストールする

(rootになり以下のコマンド実施)

wget https://github.com/ted-n/unzip/archive/master.zip
mv master master.zip
unzip master.zip
cd unzip-master/unzip60
make -f unix/Makefile LOCAL_UNZIP="-D_FILE_OFFSET_BITS=64 -DNO_LCHMOD -D_MBCS -DNO_WORKING_ISPRINT" generic_gcc
sudo make -f unix/Makefile install?

私の環境では以下のようになった:
・/usr/local/bin/unzipが新たにでき、これがsjis対応のunzip
・/usr/bin/unzipも残っており、普通にunzipコマンドを実行するとこちらが使用される

wgetするURLは以下のページの「clone or download」より取得(現状上記のURlで問題ない)
https://github.com/ted-n/unzip

こちらの記事を参考にしました
ZIPファイルに日本語ファイル名が含まれる場合の文字化け予防方法(Windows7, CentOS 6)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0