如何使cygwin tar输出正确的unicode字母而不是shashed值? [英] how to make cygwin tar output proper unicode letters instead of shashed values?

查看:281
本文介绍了如何使cygwin tar输出正确的unicode字母而不是shashed值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 *。tar.gz 文件,其中偶尔会有一些名称带有非ASCII字母。



例如当tar遇到包含单词:naïve的文件时,它输出: na\303\257ve



是否有任何swich或工具将这些斜杠值转换为正确的字母?

解决方案


http://www.gnu .org / software / tar / manual / tar.html



默认情况下,GNU tar尝试取消引用每个文件或成员名称,下表:...



此默认行为由以下命令行控制
选项:

   -  unquote 
启用无引号的输入文件或成员名称(默认)。

--no-unquote
禁用取消引用输入文件或成员名称。


换句话说,看看--no-unquote

您使用的是Cygwin tar 的哪个版本?


I have a *.tar.gz file that have inside occasionally some names with non ascii letters.

for example when tar encounter a file containing word: naïve it outputs: na\303\257ve

Is there any swich, or tool to convert these slashed values to a proper letter ?

解决方案

http://www.gnu.org/software/tar/manual/tar.html

By default GNU tar attempts to unquote each file or member name, replacing escape sequences according to the following table: ...

This default behavior is controlled by the following command line option:

--unquote
    Enable unquoting input file or member names (default).

--no-unquote
    Disable unquoting input file or member names.

In other words, see if "--no-unquote" is an option for your version of Cygwin.

PS: Which version of Cygwin tar are you using?

这篇关于如何使cygwin tar输出正确的unicode字母而不是shashed值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆