This is a bug in ascii_to_16be function, ascii.unpack("C_").pack("n_") won't work.
Change the code to ascii = ascii.unpack("C_").pack("n_") should be ok.
https://github.com/cxn03651/writeexcel/blob/master/lib/writeexcel/helper.rb
def ascii_to_16be(ascii)
ascii.unpack("C_").pack("n_")
ruby_19 { ascii.force_encoding('UTF-16BE') }
ascii
end
This is a bug in ascii_to_16be function, ascii.unpack("C_").pack("n_") won't work.
Change the code to ascii = ascii.unpack("C_").pack("n_") should be ok.
https://github.com/cxn03651/writeexcel/blob/master/lib/writeexcel/helper.rb
def ascii_to_16be(ascii)
ascii.unpack("C_").pack("n_")
ruby_19 { ascii.force_encoding('UTF-16BE') }
ascii
end