summaryrefslogtreecommitdiff
path: root/lib/rexml/encodings/EUC-JP.rb
blob: cedd6751e7cc4d46413351fdbcea4b4fd80c29a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
begin
	require 'uconv'

	module REXML
		module Encoding
			def from_euc_jp(str)
				return Uconv::euctou8(str)
			end

			def to_euc_jp content
				return Uconv::u8toeuc(content)
			end
		end
	end
rescue LoadError
	raise "uconv is required for Japanese encoding support."
end