Skip to content

Is there an easy way to marshal to unicode instead of ansi in generated code? #204

Discussion options

You must be logged in to vote

It appears either _UNICODE or UNICODE preprocessor definitions are not set when parsing CrTypes.h, so CrChar is CrAChar (char). SharpGen does the correct thing by assuming it's ANSI, not Unicode. I'm not sure if UNICODE not being defined is SharpGen's fault, but you can try adding that preprocessor definition like this:

<ItemGroup>
<CastXmlArg Include="-std=$(CppStandard)" />
</ItemGroup>

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@kmgallahan
Comment options

@jkoritzinsky
Comment options

@kmgallahan
Comment options

Answer selected by kmgallahan
Comment options

You must be logged in to vote
1 reply
@kmgallahan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants