Hi Zhenbo,
On 22/07/15 17:34, Zhenbo Li wrote:
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);*p = SysAllocStringLen(NULL, len);if(!*p) {nsACString_Finish(nscstr);return E_OUTOFMEMORY;}MultiByteToWideChar(CP_ACP, 0, str, -1, *p, len);
I didn't catch it earlier, but this should use CP_UTF8.
Cheers, Jacek