德code的base64:无效的输入 [英] decode base64: invalid input

查看:1601
本文介绍了德code的base64:无效的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在Linux上code的base64文件,我有的base64:无效输入。

When decode base64 file on linux, I got "base64: invalid input".

$ base64 test.zip | base64 -d > test2.zip
base64: invalid input
$ ll test*
-rw-r--r-- 1 user grp 152 19 11:41 test.zip
-rw-r--r-- 1 user grp  57 19 11:42 test2.zip

我试过 DOS2UNIX的的命令,但无法工作。

我的base64版本:

My base64 version:

$ base64 --version
base64 (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Simon Josefsson.

请,劝。

推荐答案

这版将不会去code(默认)用分隔符线,尚恩codeR确实在默认情况下。 (较新的版本没有这个问题。)

That version will not decode (by default) lines with separators, yet the encoder does that by default. (Newer versions don't have this problem.)

解决方法一:

的base64 -w 0 foo.zip | -d的base64 GT&; foo2.zip

备选:

的base64 foo.zip | -di的base64 GT&; foo2.zip

这篇关于德code的base64:无效的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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