Comments (10)
Per World Wide Web Consortium:
HTTP 1.1 says that the default charset is ISO-8859-1. But there are too many unlabeled documents in other encodings, so browsers use the reader's preferred encoding when there is no explicit charset parameter.
IMO, for this particular purpose, assuming UTF-8 when nothing is specified is a good default.
from whateverable.
Somewhere I've done "try utf-8 and if that fails do iso-8859-1" which always seems like a reasonable compromise (though may be more effort than warranted in the circumstance,)
from whateverable.
So if it is not utf-8
, should it blindly assume that it is utf-8
? Or what kind of encoding should it expect?
from whateverable.
I'm in favor of trying anything with a mime type that contains 'perl' or 'text', and defaulting to utf-8 seems reasonable.
from whateverable.
👍
@MasterDuke17, so what's the current behavior if no encoding is specified?
from whateverable.
It will work without complaining.
from whateverable.
more specifically it will default to utf-8. OK.
from whateverable.
I want to write a test for this, but is there any link that will be reliably giving a page with text/plain
till the end of our days?
from whateverable.
Something on http://httpbin.org/ ? Didn't see an option to generate custom content-type when I skimmed the page though
from whateverable.
@JJ does it really test it though? I think github correctly sets utf-8 so this has never been an issue with github.
from whateverable.
Related Issues (20)
- Automatic tell shouldn't work for bridged users HOT 1
- Tellable should format CTCP ACTION HOT 1
- How old are you?
- tellable and perhaps other bots should support s/foo/bar/ messages
- tellable and perhaps other bots should support ^^ messages
- Rakudo 2019.10 is now relocatable, use that to avoid locks HOT 1
- Tellable commands should count as messages
- Test ticket (please ignore)
- Can't install because of `Sake` dep instead of `sake` HOT 3
- Bot "thanks" regex is too permissive HOT 2
- Type check failed in push to Buf; expected uint8 but got Str HOT 1
- Tellable should respond to private messages HOT 4
- nick recognition and normalization is wrong HOT 1
- Refactoring, cleanup, tests (2020) HOT 1
- Automatically detect wrong bisection results due to flapping code HOT 1
- Tellable doesn't say anything when it intentionally discards messages
- GLOBAL symbol failure on install HOT 7
- fails on install with "...Redeclaration of symbol 'Message'...." HOT 4
- The state of Whateverable (2023 server migration) HOT 6
- Replace lrzip with zstd HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whateverable.