Description
This is going to be a very general issue ticket in order to discuss and address a few inconsistencies with node projects, including ours. And I'd like to hear some experiences encountered with our node project and any others.
DONE - UTF-8: All node projects should be using uppercase UTF-8
and not utf-8
according to the spec. When this is not consistent this can lead to unpredictable behavior between deployments whether on dev or production servers. Some book page websites may say it can be lowercase but some software components may not be smart enough to distinguish the difference.
DONE - Byte Order Mark (BOM) : BOMs are said to be not used everywhere... currently we have one in at least one file. This should be remedied on a system that can control that. This from my experience usually happens when there is a Unicode character inserted into a file and saved. Our current STYLEGUIDE hints at this with "Avoid use of international characters
because they may not read well or be understood everywhere.". Unfortunately I don't see an easier way to detect if a pr or commit is generating these or not.
In general encodings may need to be explicitly defined in contradiction to our current STYLEGUIDE saying the server handles it.
_EDIT_:
MIME types: These should always be included rather than having the server/client guessing off of file extensions.
See also:
- http://tools.ietf.org/html/rfc3629#section-4
- http://stackoverflow.com/questions/4990095/json-specification-and-usage-of-bom-charset-encoding
- Clean up #173 (comment) a BOM noticed here.
Applies to and isolated from #19. Most of this will go in either STYLEGUIDE and/or CONTRIBUTING