Skip to content

isAlphaNum includes mark characters, but neither isAlpha nor isNumber do

> isMark '\768'
True

> isAlphaNum '\768'
True

> (isAlpha '\768', isNumber '\768')
(False,False)

This behavior comes from this piece in WCsubst.c:

unipred(u_iswalnum,(GENCAT_LT|GENCAT_LU|GENCAT_LL|GENCAT_LM|GENCAT_LO|
		    GENCAT_MC|GENCAT_ME|GENCAT_MN|
		    GENCAT_NO|GENCAT_ND|GENCAT_NL))

I'm not sure what should be done here. Is it a bug with isAlpaNum? Or with isAlpha? How does it correspond to iswalnum's behavior in C++?

(And if it's a feature and not a bug, then it should definitely be documented.)

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC ekmett, hvr
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information