{"action":"created","issue":{"url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/issues/33","repository_url":"https://api.github.com/repos/aerospike/aerospike-client-ruby","labels_url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/issues/33/comments","events_url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/issues/33/events","html_url":"https://github.com/aerospike/aerospike-client-ruby/issues/33","id":130903798,"number":33,"title":"when use japanese or chinese in bin value get  error: incompatible character encodings: ASCII-8BIT and UTF-8","user":{"login":"fs-wu","id":11746898,"avatar_url":"https://avatars.githubusercontent.com/u/11746898?v=3","gravatar_id":"","url":"https://api.github.com/users/fs-wu","html_url":"https://github.com/fs-wu","followers_url":"https://api.github.com/users/fs-wu/followers","following_url":"https://api.github.com/users/fs-wu/following{/other_user}","gists_url":"https://api.github.com/users/fs-wu/gists{/gist_id}","starred_url":"https://api.github.com/users/fs-wu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fs-wu/subscriptions","organizations_url":"https://api.github.com/users/fs-wu/orgs","repos_url":"https://api.github.com/users/fs-wu/repos","events_url":"https://api.github.com/users/fs-wu/events{/privacy}","received_events_url":"https://api.github.com/users/fs-wu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"jhecking","id":1900876,"avatar_url":"https://avatars.githubusercontent.com/u/1900876?v=3","gravatar_id":"","url":"https://api.github.com/users/jhecking","html_url":"https://github.com/jhecking","followers_url":"https://api.github.com/users/jhecking/followers","following_url":"https://api.github.com/users/jhecking/following{/other_user}","gists_url":"https://api.github.com/users/jhecking/gists{/gist_id}","starred_url":"https://api.github.com/users/jhecking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhecking/subscriptions","organizations_url":"https://api.github.com/users/jhecking/orgs","repos_url":"https://api.github.com/users/jhecking/repos","events_url":"https://api.github.com/users/jhecking/events{/privacy}","received_events_url":"https://api.github.com/users/jhecking/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-03T03:57:24Z","updated_at":"2016-02-03T08:03:01Z","closed_at":"2016-02-03T07:46:34Z","body":"When I set japanese in bin value, I got such kind error:\r\n\" incompatible character encodings: ASCII-8BIT and UTF-8\"\r\nHow can I avoid that?\r\n\r\nHere my easy code:\r\n```\r\n# -*- coding: utf-8 -*-\r\nrequire 'rubygems'\r\nrequire 'aerospike'\r\ninclude Aerospike\r\n\r\nclient = Client.new('127.0.0.1', 3000)\r\nkey = Key.new('test', 'test', 'key1')\r\nbin1 = Bin.new('bin1','あああ')\r\n\r\nclient.put(key,[bin1])\r\n\r\nclient.close\r\n```"},"comment":{"url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/issues/comments/179078149","html_url":"https://github.com/aerospike/aerospike-client-ruby/issues/33#issuecomment-179078149","issue_url":"https://api.github.com/repos/aerospike/aerospike-client-ruby/issues/33","id":179078149,"user":{"login":"jhecking","id":1900876,"avatar_url":"https://avatars.githubusercontent.com/u/1900876?v=3","gravatar_id":"","url":"https://api.github.com/users/jhecking","html_url":"https://github.com/jhecking","followers_url":"https://api.github.com/users/jhecking/followers","following_url":"https://api.github.com/users/jhecking/following{/other_user}","gists_url":"https://api.github.com/users/jhecking/gists{/gist_id}","starred_url":"https://api.github.com/users/jhecking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhecking/subscriptions","organizations_url":"https://api.github.com/users/jhecking/orgs","repos_url":"https://api.github.com/users/jhecking/repos","events_url":"https://api.github.com/users/jhecking/events{/privacy}","received_events_url":"https://api.github.com/users/jhecking/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T08:03:01Z","updated_at":"2016-02-03T08:03:01Z","body":"@fs-wu, thanks for reporting this issue. The Aerospike server stores strings as [binary strings](http://www.aerospike.com/docs/guide/data-types.html), i.e. not bound to any specific encoding. But the Ruby client should assume UTF-8 as the default encoding and convert all string to/from binary encoding automatically.\r\n\r\nI have committed a fix to master in 6ef31a86f2663801130fcb74225fca4a09ba6584. I am planning to do a minor bug fix release for the `aerospike` package next week. But if you want, you can build the package yourself from `master` branch and give it a try."}}