add as.character
change std::wstring to std::string