Do you check the utf8 values in pstrValue are correct? Correct utf8 value for Euro sign is "0xe2, 0x82, 0xac". Also, if you check the pBuffer using C runtime function like printf, you should set locale properly before calling printf through setlocale function. I test your code but it runs correctly.