1

Can I use for my AMP pages for Google meta charset and page encoding NOT in utf8; but windows-1251 for example?

I can't find any info in the specification about it.

3
  • Why would you want to use a character set other than UTF-8 for AMP? Feb 8, 2019 at 21:19
  • Because all my content is win1251, it is a big portal 20 y. old :)
    – Seobmen
    Feb 8, 2019 at 21:49
  • UTF-8 should support Cyrillic characters. I have not found any AMP documentation that suggests that you can use anything other than UTF-8. Could you possibly re-encode the text as the page is compiled?
    – tshimkus
    Feb 8, 2019 at 21:59

2 Answers 2

3

You cannot use anything else than UTF-8 for the meta charset, as noted in the AMP HTML Specification:

Required markup

AMP HTML documents MUST

... contain a <meta charset="utf-8"> tag as the first child of their head tag

https://www.ampproject.org/docs/fundamentals/spec#chrs

Possible solutions to converting your content's encoding depend on the server technology you are using.

1

You can set the charset to anything you want:

<meta charset="utf-8">

However, know that users using a different character set will see a lot of garbled characters in your pages. If your website is 20 years old I would say it is time for a facelift and a few tweaks. You can find online utf-8 encoders that will make it easy for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.