aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/encodings/ICONV.rb
blob: f1b5c80b87b1279817e37890cd6a3edc1665ed8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "iconv"
raise LoadError unless defined? Iconv

module REXML
	module Encoding
		def decode( str )
			return Iconv::iconv(UTF_8, @encoding, str)[0]
		end

		def encode( content )
			return Iconv::iconv(@encoding, UTF_8, content)[0]
		end
	end
end