Character encoding issue

Please - have a look:

The code is:

main.php (layout file):


<div class="row" style="padding-top:1em;">

	<p">ĄąĆćĘꣳŃńÓ󌜯żŹź - This paragraph is in the layout file. All 18 diacritics are fine</p>

	<?php echo $content ;?>

</div>

about.php (the file rendered in $content):


<?php

?>

<div class="site-about">

	<p>ĄąĆćĘꣳŃńÓ󌜯żŹź - This paragraph is in the rendered content file. Diacritics are messed.</p>

</div>

Any idea why Polish diactritcs are not rendered properly while page code is injected into layout?

Thanks ahead!

(PHP 5.6.9 on Windows 7 x64, Yii 2.0.5, page encoding: UTF-8

This never happened to me. Maybe your about.php file is not saved as UTF-8. What IDE are you using?

>>What IDE are you using?

PHPStrom 9 - indeed, the "about.php" was ANSI encoded!!! (verified with Notepad++)

Indeed - while saving from Notepad as “UTF-8 without BOM” - it’s fine now. I must check PHPStrom 9 configuration. They had to change something as I never seen this issue with PHPStrom 8 or 7!

Issue is gone when I corrected the encoding and re-entered text in Notepad++.