{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/2397","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/2397/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/2397/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/2397/events","html_url":"https://github.com/aspnet/Mvc/pull/2397","id":69044602,"number":2397,"title":"Making StringCollectionTextWriter use UnicodeEncoding by default.","user":{"login":"sornaks","id":6588965,"avatar_url":"https://avatars.githubusercontent.com/u/6588965?v=3","gravatar_id":"","url":"https://api.github.com/users/sornaks","html_url":"https://github.com/sornaks","followers_url":"https://api.github.com/users/sornaks/followers","following_url":"https://api.github.com/users/sornaks/following{/other_user}","gists_url":"https://api.github.com/users/sornaks/gists{/gist_id}","starred_url":"https://api.github.com/users/sornaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sornaks/subscriptions","organizations_url":"https://api.github.com/users/sornaks/orgs","repos_url":"https://api.github.com/users/sornaks/repos","events_url":"https://api.github.com/users/sornaks/events{/privacy}","received_events_url":"https://api.github.com/users/sornaks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-17T01:45:22Z","updated_at":"2015-04-17T05:41:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/Mvc/pulls/2397","html_url":"https://github.com/aspnet/Mvc/pull/2397","diff_url":"https://github.com/aspnet/Mvc/pull/2397.diff","patch_url":"https://github.com/aspnet/Mvc/pull/2397.patch"},"body":"The `Encoding` property in `StringCollectionTextWriter` is not used anywhere. The only reason it is present is because `TextWriter` forces it to. So introducing a default constructor to avoid passing static encoding in different places in the code.\r\n\r\nRemoving code which passes `UTF-8` (mostly test) because .net uses `UTF-16` representation for strings (`StringWriter` does the same - https://msdn.microsoft.com/en-us/library/system.io.stringwriter.encoding.aspx)."},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/93897806","html_url":"https://github.com/aspnet/Mvc/pull/2397#issuecomment-93897806","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/2397","id":93897806,"user":{"login":"dougbu","id":6431421,"avatar_url":"https://avatars.githubusercontent.com/u/6431421?v=3","gravatar_id":"","url":"https://api.github.com/users/dougbu","html_url":"https://github.com/dougbu","followers_url":"https://api.github.com/users/dougbu/followers","following_url":"https://api.github.com/users/dougbu/following{/other_user}","gists_url":"https://api.github.com/users/dougbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dougbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougbu/subscriptions","organizations_url":"https://api.github.com/users/dougbu/orgs","repos_url":"https://api.github.com/users/dougbu/repos","events_url":"https://api.github.com/users/dougbu/events{/privacy}","received_events_url":"https://api.github.com/users/dougbu/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T05:41:44Z","updated_at":"2015-04-17T05:41:44Z","body":">  use Unicode as the default encoding in places where we don't know what the Encoding is\r\n\r\nwhy is Unicode more correct than the existing choice for those places?\r\n\r\n> we should leave the code unchanged in places where we were already passing in the right encoding\r\n\r\n:+1: "}}