Page 1 of 1

issue-#30 fixing Kernel.IsAlpha for Hiragana and Katakana

Posted: Fri Mar 06, 2015 12:52 pm
by Josef Templ
User X512 reported a problem with Japanese Hiragana and Katakana character sets in Kernel.IsAlpha.
cf. http://community.blackboxframework.org/ ... it=IsAlpha

The problem is that IsAlpha always returns FALSE for such characters (syllables). This follows from
the behavior of WinApi.IsCharAlphaW, which requires alpha characters to be either uppercase or lowercase
but Japanese characters don't have this property. A bug fix has been proposed by X512.
The fix uses WinApi.GetStringTypeW instead of IsCharAlphaW.
I have tested this solution and it works fine. It is also twice as fast as before,
which convinced me to include it in the center distribution.
I have tested the behavior of the old and the new version of IsAlpha and the only difference is with the
mentioned Japanese characters.

See the diffs at http://redmine.blackboxframework.org/pr ... f231d17ad4

- Josef

Re: issue-#30 fixing Kernel.IsAlpha for Japanese Hiragana an

Posted: Fri Mar 06, 2015 12:55 pm
by Ivan Denisov
If it is faster and is solving the problem, this should be adopted.