mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 21:25:13 +00:00
74b501cd85
Passing utf8 encoded strings from python to a C++ function taking a std::string was broken. The previous version was trying to call 'PyUnicode_FromObject' on this data, which failed to convert the string to unicode with the default ascii codec. Also this incurs an unnecessary conversion to unicode for data this is immediately converted back to utf8. Fix by treating python 2 strings the same python 3 bytes objects, and just copying over the data if possible. |
||
---|---|---|
.. | ||
pybind11 |