I have a SDK, and there is a folder named FaceDistortion_20171205雪天的雪人
in the zip. When I exec pod install
, I got a error:
[!] /usr/bin/unzip /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/file.zip -d /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah
Archive: /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/file.zip
bcb02cc7602513e6c0adca622302aec2112217a7
creating: /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/IESVideoEditor-bcb02cc760-bcb02cc7602513e6c0adca622302aec2112217a7/
inflating: /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/IESVideoEditor-bcb02cc760-bcb02cc7602513e6c0adca622302aec2112217a7/.clang-format
inflating: /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/XXXXXX-bcb02cc760-bcb02cc7602513e6c0adca622302aec2112217a7/README.md
checkdir error: cannot create /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/Bundles/FaceDistortion_20171205����������
Illegal byte sequence
unable to process Bundles/FaceDistortion_20171205����������/.
checkdir error: cannot create /var/folders/wc/3xbpwz1s7kbc3970y2kq8mvh0000gn/T/d20180506-48171-76pbah/Bundles/FaceDistortion_20171205����������
Illegal byte sequence
unable to process Bundles/FaceDistortion_20171205����������/content.json.
I download the zip from Safari and can unzip it by system gui tool.
The CocoaPods is v1.5.0 and macOS is v10.13.
Looks like potentially an encoding issue
I try change the encoding:
export LC_CTYPE=C
But the CocoaPods require 'utf-8'. :(
Maybe replace unzip
with ditto
:
ditto -V -x -k --sequesterRsrc --rsrc FILENAME.ZIP DESTINATIONDIRECTORY
It works OK on macOS 10.13.3 (my machine), but fails on 10.13.4 (my colleague's machine) 😞 It seems that the system upgrade changed the default encoding behavior of the unzip
utility.
How to fix it now?
Has anyone fix?
I replace unzip
with ditto
.
How to replace unzip ? Or other fix ?
I resolve the problem by changing the 'source' because the chinese char is not important.
find .cocoapods/repos/master/Specs -iname xxx
pod install --no-repo-update
or pod update --no-repo-update
It works for me. Good luck!
I hook the unzip function to ditto, it works.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
require 'cocoapods-downloader/http'
module Pod
module Downloader
# macos 10.13.4 use APFS, it's unzip have a encoding bug to Chinese Path.
# We use `ditto` instead of `unzip`
# see https://github.com/CocoaPods/CocoaPods/issues/7711
class RemoteFile < Base
executable :ditto
def unzip!(*args)
flag = args.index("-d")
unpack_from = args[flag - 1]
unpack_to = args[flag + 1]
ditto! '-x', '-k', '--sequesterRsrc', '-rsrc', unpack_from, unpack_to
end
end
end
end
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
This _seems_ like something we can fix.
I am not sure that this issue still active in macOS 10.14. Because I keep the hook method in my project, and the all pods remove the Chinese path.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:
I replace
unzip
withditto
.
works for me thanks
I have the macOS Catalina 10.15.2 and I still have this issue. The ditto
workaround works great but there is still an issue with the unzip
command.
ditto worked great for me :)
Most helpful comment
Maybe replace
unzip
withditto
: