Giter Site home page Giter Site logo

Comments (5)

ovatsus avatar ovatsus commented on August 20, 2024

Why is windows-1252 the default and not utf8?

from http.fs.

relentless avatar relentless commented on August 20, 2024

It was just what was used on wherever I got that code from in the first place (MSDN or something). I'll think about it properly when this issue gets implemented. The response defaults to ISO-8859-1, which from what I understand is the HTTP 1.1 default, so I guess it would be that or UTF-8. I take it you think UTF-8's the way to go?

from http.fs.

ovatsus avatar ovatsus commented on August 20, 2024

I always saw UTF8 used everywhere, but it's possible it's not the correct default, just wondering if you found that in any http spec, I couldn't find any info

from http.fs.

relentless avatar relentless commented on August 20, 2024

In http://www.ietf.org/rfc/rfc2616.txt, sections 3.7.1 & 14.2 discuss ISO-8859-1 being the default encoding text-based types, but that's about the response. I can't see the request body specifically mentioned.

http://stackoverflow.com/a/708942/368134 says the default for a POST body is ISO-8859-1, although I couldn't see that in either of the resources he linked to. So I'm really not sure. Let me know if you find anything definitive!

A related point, while the HTTP specs state accept-charset 'can be used to indicate what character sets are acceptable for the response', the HTML 4.01 specs (http://www.w3.org/TR/html401/interact/forms.html#adef-accept-charset) states 'This attribute specifies the list of character encodings for input data that is accepted by the server processing this form.'

from http.fs.

relentless avatar relentless commented on August 20, 2024

added withBodyEncoded

from http.fs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.