mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* unicode.c (onigenc_unicode_property_name_to_ctype):
ignore case of properties. * tool/enc-unicode.rb: downcase properties list. * enc/unicode/name2ctype.h, enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd, enc/unicode/name2ctype.src: follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e519c9d960
commit
ee4b59a419
7 changed files with 1312 additions and 1223 deletions
|
@ -2093,16 +2093,16 @@ onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end
|
|||
|
||||
p = name;
|
||||
len = 0;
|
||||
while (p < end) {
|
||||
for (p = name; p < end; p += enclen(enc, p, end)) {
|
||||
code = ONIGENC_MBC_TO_CODE(enc, p, end);
|
||||
if (code == ' ' || code == '-' || code == '_')
|
||||
continue;
|
||||
if (code >= 0x80)
|
||||
return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
|
||||
|
||||
buf[len++] = (UChar )code;
|
||||
buf[len++] = (UChar )TOLOWER((unsigned char)code);
|
||||
if (len >= PROPERTY_NAME_MAX_SIZE)
|
||||
return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
|
||||
|
||||
p += enclen(enc, p, end);
|
||||
}
|
||||
|
||||
buf[len] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue