Unicode C
Unicode C
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat Unicode C Downloads
#include <C_CkCrypt2W.h>
void ChilkatSample(void)
{
HCkCrypt2W crypt2;
const wchar_t *encodedStr;
const wchar_t *encoding;
const wchar_t *charset;
const wchar_t *str;
crypt2 = CkCrypt2W_Create();
// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
encodedStr = L"SGVsbG8gV29ybGQ=";
encoding = L"base64";
charset = L"utf-8";
str = CkCrypt2W_decodeString(crypt2,encodedStr,charset,encoding);
wprintf(L"%s\n",str);
// Output is "Hello World"
CkCrypt2W_Dispose(crypt2);
}