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

unexpected encoding #5

siuying opened this issue Dec 5, 2012 · 1 comment

unexpected encoding #5

siuying opened this issue Dec 5, 2012 · 1 comment


Copy link

@siuying siuying commented Dec 5, 2012

I noticed the strings in the unpacked data structures seems always use "ASCII-8BIT".

For example in following test case:

# encoding: utf-8
Encoding.default_internal = Encoding.default_external = "UTF-8"

describe "Encoding" do 
  it "should encode properly" do
    json = {"data"=> MessagePack.pack(["かんじ"]) }
    data = json["data"]
    data_unpacked = MessagePack.unpack(data) == "UTF-8"

In MRI with msgpack-ruby it pass but in JRuby using msgpack-jruby it always returned "ASCII-8BIT" strings.

Copy link

@iconara iconara commented Dec 5, 2012


We released a version of the gem earlier today that lets you pass in encoding, but I guess that defaulting that to default_external would make a lot of sense.

@iconara iconara closed this Apr 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants