Answer the question
In order to leave comments, you need to log in
Why doesn't CharToOemW convert all characters?
There is a line "╔════╤══════════════════════════════════␐═ ═══════════════════════╗". From it is translated into char only ══════════════════════". The CharToOem function receives a complete string. What could be the problem?
Answer the question
In order to leave comments, you need to log in
And will this work?
inline const char* wtc(const WCHAR *from)
{
//Используется буффер -- статическая переменная
static char buf[1024] = { 0 };
size_t nChars = std::min<size_t>(wcslen(from), 1024 - 1);
if (!CharToOemBuffW(from, buf, nChars)) {
cout << GetLastError();
exit(-1);
}
buf[nChars] = 0;
return buf;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question