On Tuesday 12 November 2002 10:42 pm, Dmitry Timoshkov wrote:
"Greg Turner" gmturner007@ameritech.net wrote:
But... since I seem to be volunteering to implement the function, I guess I should do it right...
try something like this (completely not tested):
int _ismbcalpha(unsigned int ch) { char mbch[2]; WCHAR chW; WORD ctype;
mbch[0] = ch & 0xff; mbch[1] = (ch >> 8) & 0xff; MultiByteToWideChar(CP_ACP, 0, mbch, 2, &chW, 1); GetStringTypeW(CT_CTYPE1, &chW, 1, &ctype); return (ctype & C1_ALPHA) != 0;
}
I'm not sure whether mbch[0] and mbch[1] should be actually swapped, in the case if multibyte character was passed in.
OK, I'll figure out the byte-ordering thing for 'ya. Thanks again,