X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_utf8.h;h=2baec7dbe8d9cdd0274552d5d3e7a771858ea72c;hp=b9b7b28f270c99d50926e9ed1fd8bb0c385aad14;hb=a760e170d36cc40ce992ebcdb13f0877ddfa3d73;hpb=62e9d3e1f5ec8896131313c70574ce7f7cbcfc99 diff --git a/php_http_utf8.h b/php_http_utf8.h index b9b7b28..2baec7d 100644 --- a/php_http_utf8.h +++ b/php_http_utf8.h @@ -737,7 +737,7 @@ static inline size_t utf8towc(unsigned *wc, const unsigned char *uc, size_t len) static inline zend_bool isualpha(unsigned ch) { - unsigned i; + unsigned i, j; for (i = 0; i < sizeof(utf8_ranges)/sizeof(utf8_range_t); ++i) { if (utf8_ranges[i].start == ch) { @@ -746,7 +746,11 @@ static inline zend_bool isualpha(unsigned ch) if (utf8_ranges[i].step == 1) { return 1; } - /* FIXME step */ + for (j = utf8_ranges[i].start; j <= utf8_ranges[i].end; j+= utf8_ranges[i].step) { + if (ch == j) { + return 1; + } + } return 0; } }