Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
378 views
in Plugins by
How to change Characterset UTF-8 ? to below?

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
Q2A version: latest
by
I'm not quite sure what your question is here. How to change UTF-8 to UTF-8?
by
I meant how to change <meta charset="utf-8"> to <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

which file is having the code to generate this <meta charset="utf-8"> ?

1 Answer

0 votes
by

Override the method head() in your theme, e.g. like this:

public function head() {
  $this->output(
    '<head>',
    '<meta http-equiv="content-type" content="text/html; charset=' . $this->content['charset'] . '"/>'
  );   

  ...

  $this->output('</head>');
}

However, according to MDN the two <meta> element notations are equivalent, so why even bother?

...