summaryrefslogtreecommitdiff
path: root/lib/rexml/encodings/Shift_JIS.rb
blob: 8650174538611b1e2bd28335280c5263354aafa7 (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 to_shift_jis content
				Uconv::u8tosjis(content)
			end

			def from_shift_jis(str)
				Uconv::sjistou8(str)
			end
		end
	end
rescue LoadError
	raise "uconv is required for Japanese encoding support."
end