# Bad value “text/html; charset=Shift_JIS” for attribute “content” on element “meta”: “charset=” must be followed by “utf-8”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-text-html-charset-shift-jis-for-attribute-content-on-element-meta-charset-must-be-followed-by-utf-8
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A `meta` element with `http-equiv="Content-Type"` must declare `utf-8` as the character encoding. Other encodings like `Shift_JIS` are not allowed in HTML5.

The HTML specification requires all documents to be encoded in UTF-8. The `meta` element's `content` attribute, when used with `http-equiv="Content-Type"`, must contain exactly `text/html; charset=utf-8`. Legacy encodings such as `Shift_JIS`, `EUC-JP`, `ISO-8859-1`, and others are non-conforming.

If the document actually uses Shift_JIS encoding, it needs to be converted to UTF-8 first. Most text editors and IDEs can re-save a file in a different encoding. After converting the file, update the `meta` declaration to reference UTF-8.

The shorter `<meta charset="utf-8">` form is equivalent and generally preferred because it is simpler.

## HTML examples

### Invalid encoding declaration

```html
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
```

### Fixed using the short form

```html
<meta charset="utf-8">
```

### Fixed using the `http-equiv` form

```html
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
```
