Skip to content

ascii_to_16be bug #44

@yinyangxu

Description

@yinyangxu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions