random1 Posted May 24, 2008 Share Posted May 24, 2008 Hey All, I have the following simple test page saved as test.php: <body> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <p>test</p> </body> Each time I load this page and view the page info I get: Content-Type" = text/html; charset=us-ascii But if I instead try: <meta http-equiv="Content-Type" content="utf8" /> Content-Type" = utf8 Any ideas? Is the server (apache) or PHP install rewriting this? Quote Link to comment Share on other sites More sharing options...
minidak03 Posted May 24, 2008 Share Posted May 24, 2008 First off you've got major HTML errors in this one change things to look like this and it should work. <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <body> <p>test</p> </body> </html> Quote Link to comment Share on other sites More sharing options...
random1 Posted May 24, 2008 Author Share Posted May 24, 2008 I've tried your code with the same outcome: Top left = original file Top right = browser with page loaded Bottom left = page info with ascii listed Middle right = HTML source in browser Quote Link to comment Share on other sites More sharing options...
minidak03 Posted May 24, 2008 Share Posted May 24, 2008 Try using your title tags inside of your <head> tags this usually fixes that. <title>This is a title</title> EDIT: So now your code will look like this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <title>This is a title</title> </head> <body> test </body> </html> Quote Link to comment Share on other sites More sharing options...
random1 Posted May 24, 2008 Author Share Posted May 24, 2008 Hi, Just tried: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <title>This is a title</title> </head> <body> test </body> </html> No luck, still says 'us-ascii' Quote Link to comment Share on other sites More sharing options...
minidak03 Posted May 24, 2008 Share Posted May 24, 2008 lol nevermind I must have mis-read your post its because your encoding is us-ASCII this can usually be changed in the program you are using under file settings. Not exactly sure which program your using though but the meta tag won't change that information. if your using non-ASCII characters like Japanese then you would be using different file settings. Quote Link to comment Share on other sites More sharing options...
random1 Posted May 24, 2008 Author Share Posted May 24, 2008 I have checked an the file is saved in UTF-8 encoding: Any more ideas? Quote Link to comment 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.