Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 196547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:46:36+00:00 2026-05-11T16:46:36+00:00

I understand that the default encoding of an HTTP Request is ISO 8859-1. Am

  • 0

I understand that the default encoding of an HTTP Request is ISO 8859-1.

Am I able to use Unicode to decode an HTTP request given as a byte array?

If not, how would I decode such a request in C#?

EDIT: I’m developing a server, not a client.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:46:37+00:00Added an answer on May 11, 2026 at 4:46 pm

    As you said the default encoding of an HTTP POST request is ISO-8859-1. Otherwise you have to look at the Content-Type header that might then look like Content-Type: application/x-www-form-urlencoded; charset=UTF-8.

    Once you have read the posted data into a byte array you may decide to convert this buffer to a string (remember all strings in .NET are UTF-16). It is only at that moment that you need to know the encoding.

    byte[] buffer = ReadFromRequestStream(...)
    string data = Encoding
                  .GetEncoding("DETECTED ENCODING OR ISO-8859-1")
                  .GetString(buffer);
    

    And to answer your question:

    Am I able to use Unicode to decode an
    HTTP request given as a byte array?

    Yes, if unicode has been used to encode this byte array:

    string data = Encoding.UTF8.GetString(buffer);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I do understand, that MVC 3 default template's Content folder is
I understand that CoCreateInstance finds the COM server for the given class id, creates
I understand that the default term frequency (tf) is simply calculated as the sqrt
This is an extension method taken out from http://dnpextensions.codeplex.com/ . I understand that the
I understand that I can use 'git push -u [repo] [br]' to make [repo]
I recently realized that I don't fully understand Java's string encoding process. Consider the
I understand that the default max stack size on ASP.NET was decreased to 256K
I understand that by default (pre ICS), to distinguish between a Tablet & Smartphone,
I understand that in Grails by default configuration vars are stored in Config.groovy and
I was given to understand that calling print obj would call obj.__str__() which would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.