{"action":"created","issue":{"url":"https://api.github.com/repos/behave/behave/issues/528","repository_url":"https://api.github.com/repos/behave/behave","labels_url":"https://api.github.com/repos/behave/behave/issues/528/labels{/name}","comments_url":"https://api.github.com/repos/behave/behave/issues/528/comments","events_url":"https://api.github.com/repos/behave/behave/issues/528/events","html_url":"https://github.com/behave/behave/issues/528","id":203612540,"number":528,"title":"Problem with encodings in behave under Windows7","user":{"login":"DaulGitHub","id":16488243,"avatar_url":"https://avatars.githubusercontent.com/u/16488243?v=3","gravatar_id":"","url":"https://api.github.com/users/DaulGitHub","html_url":"https://github.com/DaulGitHub","followers_url":"https://api.github.com/users/DaulGitHub/followers","following_url":"https://api.github.com/users/DaulGitHub/following{/other_user}","gists_url":"https://api.github.com/users/DaulGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/DaulGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaulGitHub/subscriptions","organizations_url":"https://api.github.com/users/DaulGitHub/orgs","repos_url":"https://api.github.com/users/DaulGitHub/repos","events_url":"https://api.github.com/users/DaulGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/DaulGitHub/received_events","type":"User","site_admin":false},"labels":[{"id":82233946,"url":"https://api.github.com/repos/behave/behave/labels/probably-mistaken","name":"probably-mistaken","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-01-27T11:23:49Z","updated_at":"2017-02-06T21:26:14Z","closed_at":"2017-02-06T21:26:14Z","body":"When I run the test with  behave under Windows7, such a problem:\r\nbehave encodes a string from the utf8, and then decodes in cp1251 (this is the root of the problem), translating into a script he does following (python3)\r\n```\r\ns = \"АБСДЕ\"\r\nprint (len (s2.encode ( 'utf8'). decode ( 'cp1251')))\r\n\r\n```\r\nand if we consider the problem of real scenario, I get the following:\r\nnav_menu = NavigationMenu (context.browser)\r\n```\r\ncheckString = \"Объекты\"\r\nassert nav_menu.objects_button.text == checkString, \"Falling test: Language not change\" # test here falls (although it should not)\r\n\r\n```\r\nthat is, it turns out that in nav_menu.objects_button.text includes fair value of the browser, \"Объекты\" and checkString contains a modified string, as I described above ( \" 'RћR ± SЉRμRєS,S <'\").\r\nIf I do the same thing does not behave in the context of the transformation of this line does not occur.\r\nOn Ubuntu test runs without errors, but Windows7 this fail (at the beginning of the file I put # - * - coding: utf-8 - * - although it is not required on python3).\r\nif you encountered such a problem in behave?\r\n\r\nthe problem does not occur if I put in the beginning of the file # - * - coding: cp1251 - * -, but it is a crutch ..."},"comment":{"url":"https://api.github.com/repos/behave/behave/issues/comments/277818684","html_url":"https://github.com/behave/behave/issues/528#issuecomment-277818684","issue_url":"https://api.github.com/repos/behave/behave/issues/528","id":277818684,"user":{"login":"jenisys","id":371945,"avatar_url":"https://avatars.githubusercontent.com/u/371945?v=3","gravatar_id":"","url":"https://api.github.com/users/jenisys","html_url":"https://github.com/jenisys","followers_url":"https://api.github.com/users/jenisys/followers","following_url":"https://api.github.com/users/jenisys/following{/other_user}","gists_url":"https://api.github.com/users/jenisys/gists{/gist_id}","starred_url":"https://api.github.com/users/jenisys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenisys/subscriptions","organizations_url":"https://api.github.com/users/jenisys/orgs","repos_url":"https://api.github.com/users/jenisys/repos","events_url":"https://api.github.com/users/jenisys/events{/privacy}","received_events_url":"https://api.github.com/users/jenisys/received_events","type":"User","site_admin":false},"created_at":"2017-02-06T21:26:14Z","updated_at":"2017-02-06T21:26:14Z","body":"Thanks."}}
{"actor":{"display_login":"jenisys"}}