geroid Posted April 24, 2009 Share Posted April 24, 2009 Can anyone help me with this problem. I'm trying to include the irish language on my webpage which has special characters like á ú ó If I write the page with these characters they are not understood by the browser (IE or Firefox) and appear as junk characters. I know that I can include code like Glór Cheatharlach and this will appear like Glór Cheatharlach But this is far too much work as the entire site needs these characters over and over again. I have looked at the source code of other irish language sites and they have the special characters straight there in the code with no stuff like ó and it displays in my browser perfectly. If I copy and paste that text into my html page it does not work and I get junk characters again. I really need to crack this one. Will you please look at the following site to see what I mean about the characters: www.glorcheatharlach.ie Take a look at the source code and see that the characters are written straight in and display fine except for when I do it in my pages. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/155542-display-special-characters-problem/ Share on other sites More sharing options...
Mchl Posted April 24, 2009 Share Posted April 24, 2009 Make sure you have this <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in your html's head, and that your source is saved as utf-8 without BOM (you can easily check that, and convert if needed using Notepad++) Quote Link to comment https://forums.phpfreaks.com/topic/155542-display-special-characters-problem/#findComment-818544 Share on other sites More sharing options...
geroid Posted April 24, 2009 Author Share Posted April 24, 2009 Sorry Mchl No idea what BOM is or how to save a file in it. Can you explain? Quote Link to comment https://forums.phpfreaks.com/topic/155542-display-special-characters-problem/#findComment-818628 Share on other sites More sharing options...
Mchl Posted April 24, 2009 Share Posted April 24, 2009 http://en.wikipedia.org/wiki/Byte-order_mark (you can easily check that, and convert if needed using Notepad++) Quote Link to comment https://forums.phpfreaks.com/topic/155542-display-special-characters-problem/#findComment-818632 Share on other sites More sharing options...
Axeia Posted April 25, 2009 Share Posted April 25, 2009 header('Content-Type: text/html; charset=utf-8'); Works for firefox etc to, IE still needs the meta tag though, but might slightly speed up page rendering if you send out the header. Quote Link to comment https://forums.phpfreaks.com/topic/155542-display-special-characters-problem/#findComment-819132 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.