If you want to import UTF-8, you can use mbstowcs function(Converts a sequence of multibyte characters to a corresponding sequence of wide characters)
Just exchange 3 lines of
68: char *tempSrc = strChar;
69: wchar_t *tempDest = strWChar;
70: while((*tempDest++ = *tempSrc++));
to
68: int ln...