diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-07 11:39:29 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-07 11:39:29 +0000 |
| commit | 294d6745845b2dfe9e47c3ed7ec483a921cbcf70 (patch) | |
| tree | 2cbc3ff6191d34cf69e1d2aee5dce2168e2e5e0d | |
| parent | f2e4fcdb5e8ca159980a4adc1c5acc2d34de2531 (diff) | |
| download | ruby-294d6745845b2dfe9e47c3ed7ec483a921cbcf70.tar.gz ruby-294d6745845b2dfe9e47c3ed7ec483a921cbcf70.tar.xz ruby-294d6745845b2dfe9e47c3ed7ec483a921cbcf70.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@5130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | ext/iconv/charset_alias.rb | 3 | ||||
| -rw-r--r-- | ext/iconv/iconv.c | 6 |
3 files changed, 10 insertions, 5 deletions
@@ -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> * ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrap diff --git a/ext/iconv/charset_alias.rb b/ext/iconv/charset_alias.rb index 48f0fae5f..62742e62a 100644 --- a/ext/iconv/charset_alias.rb +++ b/ext/iconv/charset_alias.rb @@ -14,8 +14,7 @@ def charset_alias(config_charset, mapfile, target = OS) next comments << list if /^\#/ =~ list next unless /^(\S+)\s+(\S+)$/ =~ list sys, can = $1, $2 - next if sys == can - next if can.downcase! and sys == can + can.downcase! map[can] = sys end case target diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 8e978b873..90bf024af 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -110,9 +110,9 @@ map_charset VALUE val = *code; if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) { - val = rb_funcall2(val, rb_intern("downcase"), 0, 0); - StringValuePtr(val); - if (st_lookup(RHASH(charset_map)->tbl, val, &val)) { + VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0); + StringValuePtr(key); + if (st_lookup(RHASH(charset_map)->tbl, key, &val)) { StringValuePtr(val); *code = val; } |
