On 8/14/2014 9:58 AM, g...@novadsp.com wrote:
I am not sure if your problem is identical to one I recently had to solve.
XRE_InitEmbedding2Type on Windows uses ReadDependentCB() and TS_tfopen()
internally (implemented in nsXPCOMGlue.cpp. In the 2 helpers, which both
take char* parameters,  the MultibyteToWideChar conversion used the CP_UTF8
flag. If your path contains MBCS double byte characters then this conversion
will produce garbage.

This is correct and intentional: see the comment at http://mxr.mozilla.org/mozilla-central/source/xpcom/build/nsXULAppAPI.h#155

We do this because on Windows the native charset doesn't represent unicode. So we use a wmain entry point and wchar, and convert to UTF8 immediately so that we can use a shared char* interface with all the other platforms.

--BDS

_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to