Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application/json should have utf-8 charset #2

Closed
jonathanong opened this issue May 2, 2014 · 10 comments
Closed

application/json should have utf-8 charset #2

jonathanong opened this issue May 2, 2014 · 10 comments

Comments

@jonathanong
Copy link
Member

because why not

@dougwilson
Copy link
Contributor

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

@Fishrock123
Copy link
Member

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.

@jonathanong
Copy link
Member Author

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

@jonathanong
Copy link
Member Author

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

@Fishrock123
Copy link
Member

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

@jonathanong
Copy link
Member Author

meh when would anyone use taht though?

@dougwilson
Copy link
Contributor

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).

@Fishrock123
Copy link
Member

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

@Fishrock123
Copy link
Member

Anyways; the issue landed in 48855cd

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

@jonathanong
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants