Skip to content
  • David Gobbi's avatar
    For Py3k, return bytes for non-utf8 C++ strings. · 4f450d14
    David Gobbi authored
    If a wrapped C++ method returns std::string or "const char *", the
    wrappers try to decode it as utf-8 in order to return a unicode str()
    in Python 3.  Originally, this meant that any decoding error led to
    a UnicodeDecodeError exception.  After this change, if decoding utf-8
    fails, the C++ string is returned as a raw bytes() object.
    4f450d14