rust-ffi-stringtools icon indicating copy to clipboard operation
rust-ffi-stringtools copied to clipboard

C# example might be wrong

Open DanielKeep opened this issue 10 years ago • 0 comments

I believe the C# example is wrong. Based on this SO answer and the MSDN documentation on CharSet, I believe the default marshalling of strings is UTF-16.

The C# example will need to either have a Rust entry point that accepts UTF-16 or manually re-encode the strings as UTF-8 on the C# side.

DanielKeep avatar Oct 17 '15 13:10 DanielKeep