base64string中的charachter无效 [英] invalid charachter in base64string

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

问题描述

我用的是




byte [] att = Convert.FromBase64String; s />
i有一个例外base64string中的无效charachter



i删除字符串中的\ n

s是:



Hi when i use

byte[] att = Convert.FromBase64String(s);
i have an exception that "invalid charachter in base64string"

i remove "\n" in string also
s is :

<attachment>LzlqLzRBQV ... vMlE9PQ==
</attachment>





大规模Base64转储删节 - OriginalGriff [/ edit]



[edit]Massive Base64 dump abridged - OriginalGriff[/edit]

推荐答案

可能是开始和结束时的HTML标签引起问题的原因是:我试着删除它们......

Probably, it's the HTML tags at the start and end that are causing the problem: I'd try removing them...
<attachment>



And

</attachment>

应该去...


忽略'\ n' 字符,你仍然有虚假的尾随'='字符。
Ignoring the '\n' character, you still have the spurious trailing '=' characters.


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

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