-
Notifications
You must be signed in to change notification settings - Fork 207
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
Py3 std::string is not converted to 'bytes' #85
Comments
I agree this is an issue, though I'm not yet sure what the right fix is. I think it would be best to not provide a default conversion for it, rather than second-guessing what the user may want / need. |
I think the issue is not with std::wstring, but std::string. The following workaround works for me:
Then it produces expected results:
|
OK, fair enough. :-) |
I think the handling is already correct in both cases, because In Python 3 philosophy, |
In Python 3, std::string is incorrectly converted to python 'str' type. It should be converted to 'bytes' type. Pull request #54 probably solves this issue.
Code of str_test module:
First example is Python 2 and shows correct results.
Second example is Python 3 and shows that std::string is unexpectedly converted to 'str'.
The text was updated successfully, but these errors were encountered: