OK so I have a PHP file with several strings of text in various languages. For most languages like French or Spanish I just simply type in the characters.
The problem I have is with Russian language characters. The PHP file is encoded in UTF-8, how can I make sure that the Russian characters are both saved correctly and displayed correctly on the output web page… Is it just a case of pasting the text into the PHP file, or is there a way to guarantee the characters will be saved into the file correctly – perhaps converting it into HTML-like notation for example?
Obviously I am assuming the end user will have the correct encoding set in their web browser, I just want to make sure I got it all covered from my end.
I am using Notepad++ on Windows to edit my PHP file.
Thanks!
if your doctype is html declare
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>but if your doctype is xhtml then declare<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />.Never assume that end-user will act correctly during your designs
If you already have some document, edit your document’s meta tag for charset declaration and use notepad++ encoding>convert to UTF-8 without BOM, save your document, safely go on with your multilingual structure from now on.
php tag is irrelevant for your question since you don’t mention about any database char setting.