Just loop through your string getting the hex values, converting them to binary and storing the binary values to a buffer.
When the string contains UTF-16 codes, the parser might look like this (untested, no error checks):
void MyConversion(CStringW str&, const char *sSrc)
{
size_t nSize = strlen(s);
wchar_t lpszBuf = new wchar_t[nSize + 1];
size_t i = 0;
while (*s && i < nSize)
{
if ('\\' == s[0] && 'u' == s[1])
{
char cSave = s[6];
s[6] = 0;
lpszBuf[i++] = strtoul(s + 2, NULL, 16);
s += 6;
*s = cSave;
}
else
lpszBuf[i++] = *s++;
}
lpszBuf[i] = 0;
str = lpszBuf;
delete [] lpszBuf;
}