{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/testfx/issues/463","repository_url":"https://api.github.com/repos/Microsoft/testfx","labels_url":"https://api.github.com/repos/Microsoft/testfx/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/testfx/issues/463/comments","events_url":"https://api.github.com/repos/Microsoft/testfx/issues/463/events","html_url":"https://github.com/Microsoft/testfx/issues/463","id":343217197,"node_id":"MDU6SXNzdWUzNDMyMTcxOTc=","number":463,"title":"Passing emoji string in [DataRow] causes error in UTF8 encoding/decoding","user":{"login":"dhhoang","id":11325809,"node_id":"MDQ6VXNlcjExMzI1ODA5","avatar_url":"https://avatars0.githubusercontent.com/u/11325809?v=4","gravatar_id":"","url":"https://api.github.com/users/dhhoang","html_url":"https://github.com/dhhoang","followers_url":"https://api.github.com/users/dhhoang/followers","following_url":"https://api.github.com/users/dhhoang/following{/other_user}","gists_url":"https://api.github.com/users/dhhoang/gists{/gist_id}","starred_url":"https://api.github.com/users/dhhoang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhhoang/subscriptions","organizations_url":"https://api.github.com/users/dhhoang/orgs","repos_url":"https://api.github.com/users/dhhoang/repos","events_url":"https://api.github.com/users/dhhoang/events{/privacy}","received_events_url":"https://api.github.com/users/dhhoang/received_events","type":"User","site_admin":false},"labels":[{"id":420464975,"node_id":"MDU6TGFiZWw0MjA0NjQ5NzU=","url":"https://api.github.com/repos/Microsoft/testfx/labels/bug","name":"bug","color":"ee0701","default":true},{"id":965609588,"node_id":"MDU6TGFiZWw5NjU2MDk1ODg=","url":"https://api.github.com/repos/Microsoft/testfx/labels/need-additional-info","name":"need-additional-info","color":"ffaafc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-20T19:08:38Z","updated_at":"2018-08-07T17:01:33Z","closed_at":null,"author_association":"NONE","body":"## Description\r\nI don't know whether this issue should be in CoreCLR/Corefx, but I am unable to reproduce it outside MSTest environment.\r\nI'm trying to pass an emoji string as parameter to `[DataRow]` but ran into the issues where UTF8 encoding back and forth produces unequal strings.\r\n\r\n## Steps to reproduce\r\nThe following test should pass, but it fails\r\n```csharp\r\n[DataRow(\"😀 😁 😂 🤣 😃 😄 😅 😆 😉\")]\r\n[TestMethod]\r\npublic void DecodeString(string str)\r\n{\r\n    var bytes = Encoding.UTF8.GetBytes(str);\r\n    var decoded = Encoding.UTF8.GetString(bytes);\r\n    Assert.AreEqual(str, decoded);\r\n}\r\n```\r\n\r\n## Expected behavior\r\n> Parameter `str` and variable `decoded` should be equal.\r\n\r\n## Actual behavior\r\n```\r\nFailed   DecodeString (😀 =� =� >� =� =� =� 😆 😉)\r\nError Message:\r\n Assert.AreEqual failed. Expected:<😀 =� =� >� =� =� =� 😆 😉>. Actual:<😀 =� =� >� =� =� =� 😆 😉>. \r\n\r\n```\r\n\r\n## Environment\r\nOS=macOS Sierra 10.12.6 (16G1510) [Darwin 16.7.0]  \r\nIntel Core i5-7360U CPU 2.30GHz (Kaby Lake), 1 CPU, 4 logical and 2 physical cores\r\n.NET Core SDK=2.1.301  \r\n  [Host]     : .NET Core 2.1.1 (CoreCLR 4.6.26606.02, CoreFX 4.6.26606.05), 64bit RyuJIT\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/testfx/issues/comments/411128975","html_url":"https://github.com/Microsoft/testfx/issues/463#issuecomment-411128975","issue_url":"https://api.github.com/repos/Microsoft/testfx/issues/463","id":411128975,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTEyODk3NQ==","user":{"login":"dhhoang","id":11325809,"node_id":"MDQ6VXNlcjExMzI1ODA5","avatar_url":"https://avatars0.githubusercontent.com/u/11325809?v=4","gravatar_id":"","url":"https://api.github.com/users/dhhoang","html_url":"https://github.com/dhhoang","followers_url":"https://api.github.com/users/dhhoang/followers","following_url":"https://api.github.com/users/dhhoang/following{/other_user}","gists_url":"https://api.github.com/users/dhhoang/gists{/gist_id}","starred_url":"https://api.github.com/users/dhhoang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhhoang/subscriptions","organizations_url":"https://api.github.com/users/dhhoang/orgs","repos_url":"https://api.github.com/users/dhhoang/repos","events_url":"https://api.github.com/users/dhhoang/events{/privacy}","received_events_url":"https://api.github.com/users/dhhoang/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T17:01:33Z","updated_at":"2018-08-07T17:01:33Z","author_association":"NONE","body":"@mayankbansal018 This issue doesn't happen on my Windows either.  \r\nOn my Mac I upgraded .Net SDK to 2.1.302 and the problem still persists. "}}
{"actor":{"display_login":"dhhoang"}}