michalchojno Posted July 27, 2009 Share Posted July 27, 2009 I want to display some non-English text on the website. I put the following code: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> The non-English letters do not display (actually these letters display in a funny way). What did I miss? Shouldn't UTF-8 have all the letters? Quote Link to comment https://forums.phpfreaks.com/topic/167595-some-letters-not-working-why/ Share on other sites More sharing options...
Zyx Posted July 27, 2009 Share Posted July 27, 2009 Yes, it has all the letters, but you haven't actually told the browser that you are using UTF-8. In case of this encoding, META tags are ignored and you have to send a HTTP header: header('Content-type: text/html;charset=utf-8'); Quote Link to comment https://forums.phpfreaks.com/topic/167595-some-letters-not-working-why/#findComment-883780 Share on other sites More sharing options...
michalchojno Posted July 27, 2009 Author Share Posted July 27, 2009 Is this PHP tag? Where should I put it? Quote Link to comment https://forums.phpfreaks.com/topic/167595-some-letters-not-working-why/#findComment-883791 Share on other sites More sharing options...
ukweb Posted July 27, 2009 Share Posted July 27, 2009 Put it in PHP tags before any HTML, line 1 basically. <?php header('Content-type: text/html;charset=utf-8'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/167595-some-letters-not-working-why/#findComment-883796 Share on other sites More sharing options...
michalchojno Posted July 27, 2009 Author Share Posted July 27, 2009 I put that. Still the letters display in a funny way. What else do I miss? Quote Link to comment https://forums.phpfreaks.com/topic/167595-some-letters-not-working-why/#findComment-884219 Share on other sites More sharing options...
MadTechie Posted July 27, 2009 Share Posted July 27, 2009 Maybe giving us an example may help! where are you getting the text from ? Quote Link to comment https://forums.phpfreaks.com/topic/167595-some-letters-not-working-why/#findComment-884220 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.