C++ controller class accepts a std::string, which only works for 8-bit encodings. Need to either make generic or provide another method for other encodings.