pkg/driver/camera/camera_windows.cpp
// utf16Decode returns UTF-8 string from UTF-16 string.
utf16Decode returns UTF-8 string from UTF-16 string.
utf16Decode returns UTF - 8 string from UTF - 16 string .
std::string utf16Decode(LPOLESTR olestr)
{
  std::wstring wstr(olestr);
  const int len = WideCharToMultiByte(
      CP_UTF8, 0,
      wstr.data(), (int)wstr.size(),
      nullptr, 0, nullptr, nullptr);
  std::string str(len, 0);
  WideCharToMultiByte(
      CP_UTF8, 0,
      wstr.data(), (int)wstr.size(),
      (LPSTR)str.data(), len, nullptr, nullptr);
  return str;
}
std :: string utf16Decode ( LPOLESTR olestr ) { std :: wstring wstr ( olestr ) ; const int len = WideCharToMultiByte ( CP_UTF8 , 0 , wstr . data ( ) , ( int ) wstr . size ( ) , nullptr , 0 , nullptr , nullptr ) ; std :: string str ( len , 0 ) ; WideCharToMultiByte ( CP_UTF8 , 0 , wstr . data ( ) , ( int ) wstr . size ( ) , ( LPSTR ) str . data ( ) , len , nullptr , nullptr ) ; return str ; }
utf16Decode returns UTF-8 string from UTF-16 string.
utf16Decode returns UTF - 8 string from UTF - 16 string .