Linux bash-zip-unicode选项
使用bash-zip存档时,我希望多字节字符以UTF-8编码。我希望确保跨平台正确提取包含多字节字符的路径。比如说,我在OSX上压缩了文件,并希望它在Windows上正确解压缩 zip man的指导如下Linux bash-zip-unicode选项,linux,bash,unicode,utf-8,Linux,Bash,Unicode,Utf 8,使用bash-zip存档时,我希望多字节字符以UTF-8编码。我希望确保跨平台正确提取包含多字节字符的路径。比如说,我在OSX上压缩了文件,并希望它在Windows上正确解压缩 zip man的指导如下 zip archive dir -r -UN=UTF8 “强制zip将UTF-8作为本机存储在存档中。”() 问题 OS X bash shell: $ zip -r test.zip tardir -UN=UTF8 zip error: Invalid command arguments (
zip archive dir -r -UN=UTF8
“强制zip将UTF-8作为本机存储在存档中。”()
问题
OS X bash shell:
$ zip -r test.zip tardir -UN=UTF8
zip error: Invalid command arguments (short option 'N' not supported)
使用长格式无助于:
$ zip -r test.zip tardir --unicode=UTF8
zip error: Invalid command arguments (long option 'unicode' not supported)
抱歉,Windows的解压/解压版本不支持UTF-8。必须对字符进行编码以匹配用户的8位代码页。最好使用
-UN=e
来转义非ASCII码chars@AlastairMcCormack谢谢您的宝贵意见。好的,Windows的解压/解压版本不支持UTF-8。必须对字符进行编码以匹配用户的8位代码页。最好使用-UN=e
来转义非ASCII码chars@AlastairMcCormack谢谢你的评论。