{"action":"created","issue":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1170","repository_url":"https://api.github.com/repos/test-kitchen/test-kitchen","labels_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1170/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1170/comments","events_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1170/events","html_url":"https://github.com/test-kitchen/test-kitchen/issues/1170","id":196267495,"number":1170,"title":"\"incompatible character encodings: UTF-8 and ASCII-8BIT\" when using cyrillic letters in cookbook","user":{"login":"jugatsu","id":2243323,"avatar_url":"https://avatars.githubusercontent.com/u/2243323?v=3","gravatar_id":"","url":"https://api.github.com/users/jugatsu","html_url":"https://github.com/jugatsu","followers_url":"https://api.github.com/users/jugatsu/followers","following_url":"https://api.github.com/users/jugatsu/following{/other_user}","gists_url":"https://api.github.com/users/jugatsu/gists{/gist_id}","starred_url":"https://api.github.com/users/jugatsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugatsu/subscriptions","organizations_url":"https://api.github.com/users/jugatsu/orgs","repos_url":"https://api.github.com/users/jugatsu/repos","events_url":"https://api.github.com/users/jugatsu/events{/privacy}","received_events_url":"https://api.github.com/users/jugatsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-18T09:55:12Z","updated_at":"2016-12-18T11:36:00Z","closed_at":null,"body":"## Description\r\n\r\ntest-kitchen failes on converge state when cookbook contains cyrillic letters. Error:\r\n\r\n> \"incompatible character encodings: UTF-8 and ASCII-8BIT\"\r\n\r\n\r\n## Kitchen Version\r\n\r\nTest Kitchen version 1.14.2\r\n\r\n## ChefDK Version\r\n\r\nChef Development Kit Version: 1.1.16\r\nchef-client version: 12.17.44\r\ndelivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)\r\nberks version: 5.2.0\r\nkitchen version: 1.14.2\r\n\r\n## Platform Version\r\n\r\nUbuntu 14.04.5 LTS.\r\n\r\n## Replication Case\r\n\r\nPlease see example cookbook below\r\n\r\n```ruby\r\nwindows_ad_ou 'Ай-ти отдел' do\r\n  domain_name 'contoso.com'\r\n  action :create\r\nend\r\n```\r\n\r\ndepends on https://github.com/TAMUArch/cookbook.windows_ad\r\n\r\nBTW, it doesn't matter which resource to use. It could be windows_package or dsc_resource\r\n\r\n```ruby\r\nwindows_package 'Ай-ти отдел' do # name changed for demonstration purpose\r\n  source 'https://notepad-plus-plus.org/repository/7.x/7.0/npp.7.Installer.exe'\r\n  checksum '0155c4ab117d63ba5142fc1090debc07dc7953264f7202ef8d25014e2cf8668d'\r\n  action :install\r\nend\r\n```\r\nor\r\n\r\n```ruby\r\ndsc_resource 'Add OU' do\r\n   resource :xADOrganizationalUnit\r\n   property :Name, 'Ай-ти отдел'\r\n   property :Path, 'dc=contoso,dc=com'\r\n   property :Ensure, 'Present'\r\n end\r\n```\r\n\r\n## Kitchen Output\r\n\r\nhttps://gist.github.com/jugatsu/4e2b36e74177910aa3da401c1757a1fa\r\n\r\n## Kitchen Diagnose\r\n\r\nhttps://gist.github.com/jugatsu/b1290d85667c41cbcc4f5f4696d54b03"},"comment":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/comments/267816402","html_url":"https://github.com/test-kitchen/test-kitchen/issues/1170#issuecomment-267816402","issue_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/1170","id":267816402,"user":{"login":"jugatsu","id":2243323,"avatar_url":"https://avatars.githubusercontent.com/u/2243323?v=3","gravatar_id":"","url":"https://api.github.com/users/jugatsu","html_url":"https://github.com/jugatsu","followers_url":"https://api.github.com/users/jugatsu/followers","following_url":"https://api.github.com/users/jugatsu/following{/other_user}","gists_url":"https://api.github.com/users/jugatsu/gists{/gist_id}","starred_url":"https://api.github.com/users/jugatsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugatsu/subscriptions","organizations_url":"https://api.github.com/users/jugatsu/orgs","repos_url":"https://api.github.com/users/jugatsu/repos","events_url":"https://api.github.com/users/jugatsu/events{/privacy}","received_events_url":"https://api.github.com/users/jugatsu/received_events","type":"User","site_admin":false},"created_at":"2016-12-18T11:36:00Z","updated_at":"2016-12-18T11:36:00Z","body":"Continue debugging. I'm trying to connect with this simple script\r\n\r\n```ruby\r\nrequire 'winrm'\r\nopts = {\r\n  endpoint: 'http://192.168.50.10:5985/wsman',\r\n  user: 'vagrant',\r\n  password: 'vagrant'\r\n}\r\nconn = WinRM::Connection.new(opts)\r\nconn.shell(:powershell) do |shell|\r\n  output = shell.run('echo \"Ай-ти отдел\"') do |stdout, stderr|\r\n    STDOUT.print stdout\r\n    STDERR.print stderr\r\n  end\r\n  puts \"The script exited with exit code #{output.exitcode}\"\r\nend\r\n``` \r\n\r\nThe output:\r\n\r\n> Ай-ти отдел\r\nThe script exited with exit code 0\r\n\r\nAs far as I know, test-kitchen is using PSRP protocol by default. So I think the root of this issue is from encoding powershell output by https://github.com/WinRb/WinRM/blob/master/lib/winrm/psrp/powershell_output_decoder.rb#L133"}}
{"actor":{"display_login":"jugatsu"}}