I am anticipating my question is about to be closed down as exact duplicate but nevertheless.
I need to display cyrillic text in HTML
<a href="<?php echo site_url('wp-login.php?action=register', 'login'); ?>"> регистрация</a>
However on the web I can see ‘squares’ if UTF-8 encoding is chosen. If I change encoding to Windows Cyrillic then link text is ok but all WordPress cyrillic contents is not displayed correctly.
So – I’ve got wordpress contents and HTML/PHP in different encodings. Do I have to save PHP in Windows Cyrillic or there is better solution?
I am using Notepad++.
You should save your file in
UTF-8instead of cyrillic, then the output will be rendered correctly.Check your editor that it can save
UTF-8files and set the encoding correctly in it.