зеркало из https://github.com/github/ruby.git
* ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):
use strcasecmp. [ruby-dev:34787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f827d95685
Коммит
5dd3a0e2dd
|
@ -1,3 +1,8 @@
|
||||||
|
Wed May 21 17:46:17 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):
|
||||||
|
use strcasecmp. [ruby-dev:34787]
|
||||||
|
|
||||||
Wed May 21 16:48:22 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed May 21 16:48:22 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_compact_bang): avoid forceful realloc.
|
* array.c (rb_ary_compact_bang): avoid forceful realloc.
|
||||||
|
|
|
@ -678,7 +678,7 @@ nkf_enc_find_index(const char *name)
|
||||||
int i, index = -1;
|
int i, index = -1;
|
||||||
if (*name == 'X' && *(name+1) == '-') name += 2;
|
if (*name == 'X' && *(name+1) == '-') name += 2;
|
||||||
for (i = 0; encoding_name_to_id_table[i].id >= 0; i++) {
|
for (i = 0; encoding_name_to_id_table[i].id >= 0; i++) {
|
||||||
if (strcmp(name, encoding_name_to_id_table[i].name) == 0) {
|
if (strcasecmp(name, encoding_name_to_id_table[i].name) == 0) {
|
||||||
return encoding_name_to_id_table[i].id;
|
return encoding_name_to_id_table[i].id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче