-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specialize the conversion between wchar_t* and Go string on Windows only #7
Conversation
fd8e1ee
to
fa9e67a
Compare
@koron Thank you for your contribution! Could you provide a little more detail on the issue you're seeing? Changes look pretty good, though I do worry a little about some of the casting being done (namely interchanging |
Thinking about this a little more, what would you think of just changing references to |
fa9e67a
to
f945509
Compare
The root cause of the problem is
And See also: https://learn.microsoft.com/en-us/cpp/cpp/char-wchar-t-char16-t-char32-t?view=msvc-170
Anyway, in Windows, what is needed is to convert between UTF-16 (wchar_t[]) and UTF-8 (Go string).
I guess the cast to unsafe.Pointer wasn't needed, I've removed it from the PR. |
Gotcha. If you could add a comment to this effect and include a copyright header at the top, we should be good to go. Thanks again! |
f945509
to
a75e45e
Compare
I added comments and update the PR. Thanks. |
Thanks @koron! I'll get this merged ASAP. |
This will fix #6