MCPcopy Create free account
hub / github.com/LAStools/LAStools / ANSItoUTF16

Function ANSItoUTF16

LASzip/src/mydefs.cpp:61–68  ·  view source on GitHub ↗

Converting ANSI to UTF-16

Source from the content-addressed store, hash-verified

59
60/// Converting ANSI to UTF-16
61wchar_t* ANSItoUTF16(const char* ansi) {
62 if (ansi == nullptr) return nullptr;
63 int len = MultiByteToWideChar(CP_ACP, 0, ansi, -1, nullptr, 0);
64 if (len <= 0) return nullptr;
65 wchar_t* utf16 = new wchar_t[len];
66 MultiByteToWideChar(CP_ACP, 0, ansi, -1, utf16, len);
67 return utf16;
68}
69#endif
70
71static bool wait_on_exit_ = false;

Callers 1

LASfopenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected