Skip to content

UTF-8, MIME Type Declaration, BOMs, and other encoding standards #198

Closed
@Martii

Description

@Martii

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:

Applies to and isolated from #19. Most of this will go in either STYLEGUIDE and/or CONTRIBUTING

Metadata

Metadata

Assignees

No one assigned

    Labels

    DOCPertains inclusively to the Documentation operations.questionA question has been encountered by anyone and has remained unanswered until cleared.team bizThis is similar to a meta discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions