{"id":4943,"date":"2014-03-30T17:09:49","date_gmt":"2014-03-30T17:09:49","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/in-net-when-i-get-a-response-stream-from-the-server-what-type-of-encoding-type-should-i-use-collection-of-common-programming-errors\/"},"modified":"2014-03-30T17:09:49","modified_gmt":"2014-03-30T17:09:49","slug":"in-net-when-i-get-a-response-stream-from-the-server-what-type-of-encoding-type-should-i-use-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/in-net-when-i-get-a-response-stream-from-the-server-what-type-of-encoding-type-should-i-use-collection-of-common-programming-errors\/","title":{"rendered":"In .NET when I get a response stream from the server what type of encoding type should I use?-Collection of common programming errors"},"content":{"rendered":"<p>It depends on what you&#8217;re expecting from the server. In the case of HTML (which seems to be your expectation), ASCII works 99% of the time for English-language pages, and should allow you to decode all HTML elements regardless. However, one of the first things you should do is read any &#8220;meta&#8221; tags in the head element of the document; these will specify the encoding of text in the body. Usually, if that isn&#8217;t ASCII it&#8217;s UTF-8, which is backwards-compatible to ASCII (but will show some weird characters for 2-byte and 4-byte character codes).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It depends on what you&#8217;re expecting from the server. In the case of HTML (which seems to be your expectation), ASCII works 99% of the time for English-language pages, and should allow you to decode all HTML elements regardless. However, one of the first things you should do is read any &#8220;meta&#8221; tags in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4943","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4943"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4943\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}