本文介绍了如何在javascript中编码/解码ascii85的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找 Base64 的替代品,该替代品可以很好地处理Unicode字符.我发现 ASCII85 效果很好,但是在 JS 中没有发现执行此操作的代码或命令.

I was looking for an alternative to Base64 which works fine on Unicode characters. I have found ASCII85 which works great however I found no code or command doing that in JS.

我刚刚发现不适用于国际字符,并且不包含解码功能.

I just found this link which does not work for international characters and does not include decode function.

这里有在线解码器/编码器.

甚至用C语言找到了代码(我没有没有足够的JS数据处理知识来转换).

Even found codes in C language doing that(I don't have enough JS data handling knowledge to convert).

还有一些代码不知道如何运行.

And some codes that I don't know how to run.

我听说 JQuery 确实支持 Base64 ,但似乎它不支持 Ascii85 .

I have heard that JQuery does support Base64 but it seems that it does not support Ascii85.

有人对JS中的 Ascii85 有所了解吗?

Does somebody know anything about Ascii85 in JS which might help?

谢谢

推荐答案

:

解码示例+来源

编码示例+源

ascii85使用

摘要:

dojo.require("dojox.encoding.ascii85");
var dc = dojox.encoding
var buf = dc.ascii85.decode("")
var a85 = dc.ascii85.encode("");

这篇关于如何在javascript中编码/解码ascii85的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 00:41