I use <meta http-equiv="content-type" content="text/html; charset=utf-8" /> in my PHP files to enable characters like ąčęė....
In my index.php file, text produced by HTML or PHP looks fine, but in another file (miestai.php) text written by PHP looks fine, but text written by HTML is messed up (instead of ą I get �).
When I remove <meta http-equiv="content-type" content="text/html; charset=utf-8" /> from that file, text written by HTML looks fine, but text written by PHP is messed up.
How can I fix this problem?
Note: both files are in the same folder. I even pasted all content from index.php to miestai.php but I still got the same problem.
�almost always means something is not encoded in UTF-8 but is being interpreted as UTF-8. You need to go UTF-8 all the way through, not just in headers. Save your files in UTF-8, set your database to use UTF-8 and so on.If you have these strings literally in your PHP files, then those files are not saved in UTF-8. As in: