Sample code for 30+ languages & platforms
Unicode C++

StringBuilder EntityDecode

Demonstrates the Chilkat StringBuilder EntityDecode method to decode HTML entities.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkStringBuilderW.h>

void ChilkatSample(void)
    {
    //  Decode the following HTML entities, replacing each with the character represented.
    const wchar_t *s = L"&eacute; &#233; &#xE9; Latin small letter e with acute";

    CkStringBuilderW sb;

    sb.Append(s);
    sb.EntityDecode();

    //  Output: é é é Latin small letter e with acute
    wprintf(L"%s\n",sb.getAsString());
    }