Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ascii_to_16be bug #44

Open
yinyangxu opened this issue Jul 7, 2015 · 0 comments
Open

ascii_to_16be bug #44

yinyangxu opened this issue Jul 7, 2015 · 0 comments

Comments

@yinyangxu
Copy link

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

cxn03651 pushed a commit that referenced this issue Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant