3 def encode_utf16 content
4 array_utf8 = content.unpack("U*")
6 array_utf8.each do |num|
11 array_enc << (num >> 8)
12 array_enc << (num & 0xFF)
19 str = str[2..-1] if /^\376\377/n =~ str
20 array_enc=str.unpack('C*')
22 0.step(array_enc.size-1, 2){|i|
23 array_utf8 << (array_enc.at(i+1) + array_enc.at(i)*0x100)
28 register(UTF_16) do |obj|
30 alias decode decode_utf16
31 alias encode encode_utf16