VBScript Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VBScript Examples

Bounced Mail
Bz2
Character Encoding
Digital Certificates
CSV
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
Byte Array
RSS
Atom
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

Re-Encode a String (Hex, Base64, URL, etc)

Demonstrates how to convert from one encoding to another. For example: base64 to hex, URL to base64, base64 to quoted-printable, etc.

Download Chilkat Crypt ActiveX

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)


set crypt = CreateObject("Chilkat.Crypt2")

'  Any string argument automatically begins the 30-day trial.
success = crypt.UnlockComponent("30-day trial")
If (success <> 1) Then
    MsgBox "Crypt component unlock failed"
    WScript.Quit
End If

hexStr = "41424344E0E1E2E3"

fromEncoding = "hex"
toEncoding = "base64"

'  Convert from hex to base64
base64 = crypt.ReEncode(hexStr,fromEncoding,toEncoding)
outFile.WriteLine(base64)

'  Now convert from base64 to quoted-printable:
fromEncoding = "base64"
toEncoding = "quoted-printable"
qp = crypt.ReEncode(base64,fromEncoding,toEncoding)
outFile.WriteLine(qp)

'  Now convert from quoted-printable to URL:
fromEncoding = "quoted-printable"
toEncoding = "url"
urlEnc = crypt.ReEncode(qp,fromEncoding,toEncoding)
outFile.WriteLine(urlEnc)

'  Now convert from URL back to hex:
fromEncoding = "url"
toEncoding = "hex"
hexStr = crypt.ReEncode(urlEnc,fromEncoding,toEncoding)
outFile.WriteLine(hexStr)

'  The output of this program is:
'  QUJDRODh4uM=
'  ABCD=E0=E1=E2=E3
'  ABCD%E0%E1%E2%E3
'  41424344E0E1E2E3

outFile.Close

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.

Mail Component · XML Parser