Page 1 of 1

Kernel.IsAlpha issue

Posted: Sat Feb 07, 2015 3:03 pm
by X512
Kernel.IsAlpha do not consider hiragana and katakana writing system of Japanese language as alpha character. Japanese language use 3 writing systems (hiragana, katakana and Chinese characters) simultaneously.

My suggestion of fixing issue :

Code: Select all

PROCEDURE IsAlpha* (ch: CHAR): BOOLEAN;
	VAR type: SHORTINT; res: INTEGER;
BEGIN
	res := WinApi.GetStringTypeW(WinApi.CT_CTYPE1, S.VAL(WinApi.PtrWSTR, S.ADR(ch)), 1, type);
	RETURN BITS(WinApi.C1_ALPHA) * BITS(type) # {}
END IsAlpha;
Unfortunately I couldn't find any issue tracking system with open access so I report issue here.
Some details of the issue can be found here: http://www.siao2.com/2005/09/12/463991.aspx.

Re: Kernel.IsAlpha issue

Posted: Tue Feb 10, 2015 12:13 pm
by Ivan Denisov
Welcome to the BlackBox Community Board!

There are open Issues tracker here:
https://github.com/BlackBoxCenter/blackbox/issues
However it is not used much now.

Thank you for this issue and suggested solution.

Re: Kernel.IsAlpha issue

Posted: Wed Feb 11, 2015 1:45 pm
by Robert
Ivan Denisov wrote:There are open Issues tracker here:
https://github.com/BlackBoxCenter/blackbox/issues
However it is not used much now.
Maybe it would be if it were added to the "Useful Links" section?

Regards

Re: Kernel.IsAlpha issue

Posted: Wed Feb 11, 2015 3:27 pm
by Josef Templ
Kernel.IsAlpha uses WinApi.IsCharAlphaW, which returns TRUE only for
characters that are either upper or lower case.

Using GetStringTypeW provides all the information at once as a set of bits
and is more than two times faster when measured over all 16-bit characters.
So it might really be considered an alternative.

The Japanese will have troubles with the name of a module in a subsystem.
For that they need a transition from non-upper case to upper-case in the module name
and it seems that their syllables are neither.

- Josef

Re: Kernel.IsAlpha issue

Posted: Wed Feb 11, 2015 6:33 pm
by Ivan Denisov
Robert wrote:
Ivan Denisov wrote:There are open Issues tracker here:
https://github.com/BlackBoxCenter/blackbox/issues
However it is not used much now.
Maybe it would be if it were added to the "Useful Links" section?
Good idea. I added this link to useful links section.

Re: Kernel.IsAlpha issue

Posted: Tue Mar 10, 2015 2:14 pm
by Ivan Denisov
X512, center included you solution in alpha version.
Can you please check, does it work well?

http://blackboxframework.org/unstable/m ... -setup.exe
http://blackboxframework.org/unstable/m ... a1.073.zip

Re: Kernel.IsAlpha issue

Posted: Fri Jul 15, 2016 4:00 pm
by X512
Sorry for being late.
BlackBox 1.7-rc.571 is working property. Issue is fixed.