issue-#30 fixing Kernel.IsAlpha for Hiragana and Katakana
Posted: Fri Mar 06, 2015 12:52 pm
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
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