Sample code for 30+ languages & platforms
Xbase++ Requires Chilkat v11.2.0+

Base62 Encoding and Decoding

Demonstrates base62 encoding and decoding.

Chilkat Xbase++ Downloads

Xbase++
LOCAL oBd
LOCAL cBase62_encoded
LOCAL oSb

oBd := CreateObject("Chilkat.BinData")

//  Base62 encode.
oBd:AppendString("hello world", "utf-8")
cBase62_encoded := oBd:GetEncoded("base62")
? "hello world --> " + cBase62_encoded

//  Output: 
//  hello world --> AAwf93rvy4aWQVw

//  Base62 decode
oSb := CreateObject("Chilkat.StringBuilder")
oSb:DecodeAndAppend("AAwf93rvy4aWQVw", "base62", "utf-8")
? "decoded: " + oSb:GetAsString()

//  Output:
//  decoded: hello world

oBd:destroy()
oSb:destroy()