Giter Club home page Giter Club logo

Comments (10)

dougwilson avatar dougwilson commented on August 23, 2024

exactly "because why not" is how I see it :D

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

We should probably let the user define the implied charset. (with fallback to UTF-8)

As for setting it, /text|json|javascript/ could work as a start.

Though it omits a lot. Specifically xml types. But we cannot guarantee that a type that has "xml" in it will have a sane charset.

from mime-types.

jonathanong avatar jonathanong commented on August 23, 2024

what do you mean? users should only be using .lookup() if a charset isn't defined. i.e. look at contentType()

from mime-types.

jonathanong avatar jonathanong commented on August 23, 2024

oh yeah we should include javascript as well... because why not

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

@jonathanong I mean users should be able to set the global charset for this module. (defaulting to UTF-8)

from mime-types.

jonathanong avatar jonathanong commented on August 23, 2024

meh when would anyone use taht though?

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

We should probably let the user define the implied charset.

It's probably dubious, since they'd really need to be using Buffers everywhere and iconv so their generated responses are actually in the correct byte format. (i.e. they probably aren't and as such are sending UTF-8 bytes).

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

Oh, eh. Whatever. Not using UTF-8 is pretty much nonsense anyways.

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

Anyways; the issue landed in 48855cd

I'll think about /text|json|javascript/.

from mime-types.

jonathanong avatar jonathanong commented on August 23, 2024

yeah, i dunno about js. i think we should wait until people open up charset issues before adding additional special cases.

from mime-types.

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.