summaryrefslogtreecommitdiff
path: root/lib/rexml/encodings/UTF-16.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/encodings/UTF-16.rb')
-rw-r--r--lib/rexml/encodings/UTF-16.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/encodings/UTF-16.rb b/lib/rexml/encodings/UTF-16.rb
index 2aeef76a0c..31f2d81a5b 100644
--- a/lib/rexml/encodings/UTF-16.rb
+++ b/lib/rexml/encodings/UTF-16.rb
@@ -1,6 +1,6 @@
module REXML
module Encoding
- def to_utf_16 content
+ def encode content
array_utf8 = content.unpack("U*")
array_enc = []
array_utf8.each do |num|
@@ -15,7 +15,7 @@ module REXML
array_enc.pack('C*')
end
- def from_utf_16(str)
+ def decode(str)
array_enc=str.unpack('C*')
array_utf8 = []
2.step(arrayEnc.size-1, 2){|i|