初めて投稿させて頂きます。水谷と申します。

Soloris9 上で REXML での XML 読込みで不具合がありました。何か
よい解決方法はないでしょうか。

よろしくお願い致します。

test.rb
======================
require 'rexml/document'
require 'kconv'

doc = REXML::Document.new(File.read('euc.xml'))
puts doc.to_s.toeuc
======================

euc.xml
======================
<?xml version="1.0" encoding="EUC-JP"?>
<root>
<text>テスト</text>
</root>
======================


環境は、

 $ ruby -v
 ruby 1.8.2 (2004-12-25) [sparc-solaris2.9]


実行結果:

 $ ruby test.rb
 /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/parsers/treeparser.rb:85:in `parse': #<NameError: uninitialized constant REXML::Source::Iconv> (REXML::ParseException)
 (eval):6:in `encode'
 /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/source.rb:41:in `encoding='
 /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/parsers/baseparser.rb:202:in `pull'
 /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
 /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/document.rb:176:in `build'
 /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
 test.rb:4:in `new'
 test.rb:4
 ...
 uninitialized constant REXML::Source::Iconv
 Line:
 Position:
 Last 80 unconsumed characters:
  <root> <text>テスト</text> </root>     from /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/document.rb:176:in `build'
         from /usr/local/ruby-1.8.2/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
         from test.rb:4:in `new'
         from test.rb:4