1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/iconv/iconv.c (map_charset): make case sensitive.

ext/iconv/charset_alias.rb (charset_alias): don't ignore
  config.charset's information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2003-12-07 11:39:29 +00:00
parent e735472d1f
commit c4d502c931
3 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,9 @@
Sun Dec 7 20:36:42 2003 Tanaka Akira <akr@m17n.org>
* ext/iconv/iconv.c (map_charset): make case sensitive.
ext/iconv/charset_alias.rb (charset_alias): don't ignore
config.charset's information.
Sat Dec 6 22:58:03 2003 GOTOU Yuuzou <gotoyuzo@notwork.org> Sat Dec 6 22:58:03 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrap * ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrap

View file

@ -14,8 +14,7 @@ def charset_alias(config_charset, mapfile, target = OS)
next comments << list if /^\#/ =~ list next comments << list if /^\#/ =~ list
next unless /^(\S+)\s+(\S+)$/ =~ list next unless /^(\S+)\s+(\S+)$/ =~ list
sys, can = $1, $2 sys, can = $1, $2
next if sys == can can.downcase!
next if can.downcase! and sys == can
map[can] = sys map[can] = sys
end end
case target case target

View file

@ -110,9 +110,9 @@ map_charset
VALUE val = *code; VALUE val = *code;
if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) { if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) {
val = rb_funcall2(val, rb_intern("downcase"), 0, 0); VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
StringValuePtr(val); StringValuePtr(key);
if (st_lookup(RHASH(charset_map)->tbl, val, &val)) { if (st_lookup(RHASH(charset_map)->tbl, key, &val)) {
StringValuePtr(val); StringValuePtr(val);
*code = val; *code = val;
} }