X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=handy.h;h=2077007b4c4d59ab515319331d0224d5052242ad;hb=edc2eac33c792d54399e570820645265bcb07080;hp=9a06b77e2612844efb25c9b7393e177dd323506a;hpb=0e983133b1c8b37e15a466d55b4d79492d02e7da;p=p5sagit%2Fp5-mst-13.2.git diff --git a/handy.h b/handy.h index 9a06b77..2077007 100644 --- a/handy.h +++ b/handy.h @@ -460,7 +460,10 @@ Converts the specified character to lowercase. #define isBLANK_LC_uni(c) isBLANK(c) /* could be wrong */ #define isALNUM_utf8(p) is_utf8_alnum(p) -#define isIDFIRST_utf8(p) is_utf8_idfirst(p) +/* The ID_Start of Unicode is quite limiting: it assumes a L-class + * character (meaning that you cannot have, say, a CJK character). + * Instead, let's allow ID_Continue but not digits. */ +#define isIDFIRST_utf8(p) (is_utf8_idcont(p) && !is_utf8_digit(p)) #define isALPHA_utf8(p) is_utf8_alpha(p) #define isSPACE_utf8(p) is_utf8_space(p) #define isDIGIT_utf8(p) is_utf8_digit(p)