Kernel.IsAlpha issue

Post Reply
X512
Posts: 72
Joined: Sat Feb 07, 2015 2:51 pm

Kernel.IsAlpha issue

Post 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.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Kernel.IsAlpha issue

Post 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.
User avatar
Robert
Posts: 177
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Kernel.IsAlpha issue

Post 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
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Kernel.IsAlpha issue

Post 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
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Kernel.IsAlpha issue

Post 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.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Kernel.IsAlpha issue

Post 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
X512
Posts: 72
Joined: Sat Feb 07, 2015 2:51 pm

Re: Kernel.IsAlpha issue

Post by X512 »

Sorry for being late.
BlackBox 1.7-rc.571 is working property. Issue is fixed.
Post Reply