Skip to content

Naïve coercion of file encodings causes mojibake #5

@ctrlcctrlv

Description

@ctrlcctrlv

Given your work on 2channel, this error is particularly naïve.

HTML -> setContentType "text/html; charset=utf-8"

The code is written such that any file ending with .html will be returned with the charset utf-8.

Obviously this will not work for SJIS files. Encodings cannot be guessed like this. That's why the <meta charset> exists, and should be used instead. Trying to coerce the encoding will cause browsers to disable their encoding detection, and cause mojibake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions