Unicode C++
Unicode C++
HTML Encoding
Demonstrates HTML encoding and decoding.Chilkat Unicode C++ Downloads
#include <CkCrypt2W.h>
void ChilkatSample(void)
{
CkCrypt2W crypt;
const wchar_t *s = L"< é ü ç Ω Hello & World ✓ >";
const wchar_t *htmlEncoded = crypt.encodeString(s,L"utf-8",L"html");
wprintf(L"%s\n",htmlEncoded);
// Output:
// < é ü ç Ω Hello & World ✓ >
// To decode:
s = crypt.decodeString(htmlEncoded,L"utf-8",L"html");
wprintf(L"%s\n",s);
// Output:
// < é ü ç Ω Hello & World ✓ >
}