How do browsers determine the encoding used?

后端 未结 3 1512
情书的邮戳
情书的邮戳 2021-02-06 15:45

I do understand there are 2 ways to set the encoding:

  1. By using Content-Type header.
  2. By using meta tags in HTML

Since Content-Type header is

3条回答
  •  忘掉有多难
    2021-02-06 16:24

    I've encountered problem with output encoding of HTML. If you are creating website or webservice with .i.e nodejs or golang... and you're not sure just add Content-Type charset to header: For example in golang: resp.Header.Set("Content-Type", "text/html; charset=GB18030");

提交回复
热议问题