The Problem with Encodings

For Cyrillic text to display correctly, several conditions must be met. Firstly, the encoding of the file itself must be utf-8. Secondly, you need to specify the encoding in the HTML code:

index.php<meta charset="utf-8">
<?php
  echo 'моя первая программа';
?>

Sometimes the described procedures do not help and then the mb_internal_encoding command can help:

index.php<meta charset="utf-8">
<?php
  mb_internal_encoding('UTF-8');
  echo 'моя первая программа';
?>