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

module REXML
  module Encoding
    def decode_eucjp(str)
      Uconv::euctou8(str)
    end

    def encode_eucjp content
      Uconv::u8toeuc(content)
    end

    register("EUC-JP") do |obj|
      class << obj
        alias decode decode_eucjp
        alias encode encode_eucjp
      end
    end
  end
end