{"action":"created","issue":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/410","repository_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds","labels_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/410/comments","events_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/410/events","html_url":"https://github.com/rails-sqlserver/tiny_tds/issues/410","id":326684670,"number":410,"title":"Impossible to avoid use_utf16 option warning on older FreeTDS versions","user":{"login":"jeremyevans","id":3846,"avatar_url":"https://avatars3.githubusercontent.com/u/3846?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremyevans","html_url":"https://github.com/jeremyevans","followers_url":"https://api.github.com/users/jeremyevans/followers","following_url":"https://api.github.com/users/jeremyevans/following{/other_user}","gists_url":"https://api.github.com/users/jeremyevans/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyevans/subscriptions","organizations_url":"https://api.github.com/users/jeremyevans/orgs","repos_url":"https://api.github.com/users/jeremyevans/repos","events_url":"https://api.github.com/users/jeremyevans/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyevans/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-25T22:57:41Z","updated_at":"2018-05-28T19:43:26Z","closed_at":"2018-05-28T00:21:20Z","author_association":"CONTRIBUTOR","body":"tiny_tds forces the `:use_utf16` value to `true` or `false` before calling connect (https://github.com/rails-sqlserver/tiny_tds/blob/master/lib/tiny_tds/client.rb#L52), and if the value is `true` or `false`, emits a warning inside connect (https://github.com/rails-sqlserver/tiny_tds/blob/master/ext/tiny_tds/client.c#L364-L366).\r\n\r\nI think there are a couple options here.  You could skip forcing the `:use_utf16` value to `true` if the `:use_utf16=>nil` option is used, either using `Hash#fetch` or `Hash#has_key?` to check if the value is explicitly given as `nil`, and leave it as `nil` in that case.  Alternatively, maybe just do not warn if the value is `false`."},"comment":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/comments/392592944","html_url":"https://github.com/rails-sqlserver/tiny_tds/issues/410#issuecomment-392592944","issue_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/410","id":392592944,"user":{"login":"metaskills","id":2381,"avatar_url":"https://avatars0.githubusercontent.com/u/2381?v=4","gravatar_id":"","url":"https://api.github.com/users/metaskills","html_url":"https://github.com/metaskills","followers_url":"https://api.github.com/users/metaskills/followers","following_url":"https://api.github.com/users/metaskills/following{/other_user}","gists_url":"https://api.github.com/users/metaskills/gists{/gist_id}","starred_url":"https://api.github.com/users/metaskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metaskills/subscriptions","organizations_url":"https://api.github.com/users/metaskills/orgs","repos_url":"https://api.github.com/users/metaskills/repos","events_url":"https://api.github.com/users/metaskills/events{/privacy}","received_events_url":"https://api.github.com/users/metaskills/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T19:43:26Z","updated_at":"2018-05-28T19:43:26Z","author_association":"CONTRIBUTOR","body":"> don't have control\r\n>  cannot readily fix\r\n\r\nIt has been a few years, I thought the distros would be updated, what version are you on?\r\n\r\n> especially for something that will never affect you\r\n\r\nNot sure that is true. It is very common nowadays to deal with emoji and wide characters in the DB.\r\n\r\n> Can you switch from rb_warn to rb_warning\r\n\r\nNeat idea... let me consider that."}}
{"actor":{"display_login":"metaskills"}}