On Tuesday 12 November 2002 06:43 pm, Dmitry Timoshkov wrote:
"Greg Turner" gmturner007@ameritech.net wrote:
+int _ismbcalpha(unsigned int ch) +{
- if (ch < 0x100)
- return ((0x41 <= ch && ch <= 0x5a) ||
(0x61 <= ch && ch <= 0x7a) ||
/* Japanese/Katakana, CP 932 */
(0xa6 <= ch && ch <= 0xdf));
- else
- {
FIXME("Handle MBC chars\n");
return 0;
- }
+}
It's better to create a correct multibyte character pair and call GetStringType then.
you mean this beast?
BOOL GetStringTypeW( DWORD dwInfoType, // information-type options LPCWSTR lpSrcStr, // source string int cchSrc, // number of characters in string LPWORD lpCharType // output buffer );
You are probably far better informed on these issues than I, but this seems slightly excessive to me -- or, perhaps I'm suffering from sour grapes syndrome, since I'm somewhat out of my element here (I seem to be saying that a lot lately don't I? When, I wonder, will I start to feel that I am /in/ my element?? (Probably not until wine is written in Kylix ... man, that's embarassing!!))
My patch was intended to be a clone of the similar implementations I saw in the same unit, not a full implementation.
But... since I seem to be volunteering to implement the function, I guess I should do it right...
So, on second thought, merged or no, I'll try to whip up a better version of _ismbc* and maybe, if I'm feeling especially cool, some others in the vicinity, using GetStringType as you reccomend.
thanks for your advice,