ASP经典 - 使用Base64Binary字符串转换为字节数组 [英] ASP Classic - convert base64binary string to byte array

查看:802
本文介绍了ASP经典 - 使用Base64Binary字符串转换为字节数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个使用Base64Binary字符串转换为传统的ASP的字节数组。中StrConv()不存在ASP。

I am trying to convert a base64binary string to a byte array in classic ASP. StrConv() doesn't exist in ASP.

我的目标是把从Web服务调用收到的使用Base64Binary字符串,并写入二进制格式的文件。

My objective is to take the base64binary string received from a web service call, and write the binary format to a file.

感谢,

-m

thanks,
-m

推荐答案

在前段时间面临着类似的情况,我用的 MSXML 的保存到文件之前将数据转换为字节数组。您将需要3或更高版本。

When faced with a similar situation some time ago, I used MSXML to convert the data to a byte array before saving it to a file. You will need version 3 or higher.

要做到这一点,你会:

  • Load the data with MSXML
  • Set the node's dataType property to bin.base64
  • Read the binary data from the node using the nodeTypedValue property
  • To save the file you can use the ADODB.Stream component.

这是怎么这个都低于几个环节。

A few links on how the to this are below.

http://ghads.word$p$pss.com/2008/10/17/vbscript-readwrite-binary-en$c$cde$c$c-base64/

http://support.microsoft.com/kb/254388

http://www.motobit.com/tips/detpg_binasp/

这篇关于ASP经典 - 使用Base64Binary字符串转换为字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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