grpcio-sys 0.13.0+1.56.2-patched

FFI bindings to gRPC c core library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <boost/locale.hpp>

using namespace std;

/* Return 0 on sucess, -1 on error */
extern "C" int utf8_boost(const unsigned char* data, int len) {
  try {
    boost::locale::conv::utf_to_utf<char>(data, data + len,
                                          boost::locale::conv::stop);
  } catch (const boost::locale::conv::conversion_error& ex) {
    return -1;
  }

  return 0;
}