Skip to content

Use UTF8 as default charset for Text and JSON #913

@StarpTech

Description

@StarpTech

Hi, when I return a string like ÄÜÖ the browser is interpreted as

ÄÜÖ

fastify will respond with

content-type: text/html;
content-type: application/json;

it's obvious that I use the wrong charset but UTF8 is defacto standard and should be used as default.

content-type: text/html; charset=utf-8
content-type: application/json; charset=utf-8

A Unicode encoding such as UTF-8 is a good choice for a number of reasons.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions