Page 1 of 1
CHESS SITE
Posted: Thu Apr 30, 2015 6:22 pm
by Vegan
My
chess site has several pages that are assembled with PHP
for some reason, the dialogs series of .... are changed into some unknown symbol and I cannot figure out why
i have tried careful code checking, was working but then it stopped with no changes outside more games played
here is a link to the
raw output for comparison
Re: CHESS SITE
Posted: Thu Apr 30, 2015 8:25 pm
by requinix
So those are supposed to be dots? group1.php is using the UTF-8 encoding but the dots are in ISO 8859-1. (The group1.html page is using the latter so it appears correctly.)
I suspect is't the "ANSI" charset you're using. I'm not even sure that's a valid name for it. Use
Code: Select all
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta charset="ISO-8859-1">
Re: CHESS SITE
Posted: Sat May 02, 2015 11:07 am
by Vegan
I have tried that, same problem
I was able to partially fix it with a hard coded & code, but the .. was not fixed, only the isolated ones
I have even tried using a <font> to force the issue, no such luck
Re: CHESS SITE
Posted: Sat May 02, 2015 8:27 pm
by requinix
Could be the output itself is wrong. What's the code there look like?
Re: CHESS SITE
Posted: Sun May 03, 2015 6:57 am
by Vegan
Code: Select all
<html lang="en">
<head>
<meta content="en-us" http-equiv="Content-Language">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<link href="http://computer-chess.azurewebsites.net/css/images.css" rel="stylesheet" type="text/css">
<link href="http://computer-chess.azurewebsites.net/css/styles.css" rel="stylesheet" type="text/css">
<link href="http://computer-chess.azurewebsites.net/css/tables.css" rel="stylesheet" type="text/css">
<!-- <script src="http://computer-chess.azurewebsites.net/js/general.js" type="text/javascript"></script> -->
<!-- <script src="http://computer-chess.azurewebsites.net/js/advertisement.js" type="text/javascript"></script> -->
<meta content="900" http-equiv="refresh">
<title>Computer Chess: Tournaments</title>
</head>
<body id="body">
<!-- Header block --><?php include $_SERVER["DOCUMENT_ROOT"] . "/menu.php"; ?>
<h1>CHESS TOURNAMENTS</h1>
<?php include $_SERVER["DOCUMENT_ROOT"] . "/tournaments/group-body.php"; ?> <!-- the top body part -->
<?php include $_SERVER["DOCUMENT_ROOT"] . "/tournaments/html/group1.html"; ?> <!-- Arena conveniently formats results -->
<?php include $_SERVER["DOCUMENT_ROOT"] . "/footer.php"; ?> <!-- Footer block, legals etc -->
</body>
</html>
Re: CHESS SITE
Posted: Sun May 03, 2015 7:30 am
by requinix
Oh, group1.html actually is the source. Okay.
Didn't matter anyways. Your server is sending a header
Code: Select all
Content-Type:text/html; charset=UTF-8
Apparently that's taking precedence over the ISO-8859-1 you put in the HTML. Your PHP isn't doing that (unless you have an auto_prepend_file) so it's probably a server configuration thing. Can you change that?
Re: CHESS SITE
Posted: Sun May 03, 2015 8:57 am
by Vegan
nothing like that noticed and that is something that recently has been changed
I will inquires over in the Azure forum, maybe somebody over there has some ideas?
Thanks for looking, did not think my code as borked, seems pretty basic
Re: CHESS SITE
Posted: Sun May 03, 2015 6:58 pm
by Vegan
I have figured out the problem, the PHP 5.6 is the problem, setting it back to 5.4 and the page rendered as expected
so I have brought this to the attention of the host, Microsoft Azure so that they can fix it, as I am now more confident my page is LEGAL and valid
I have had to add some PHP code to the page template to override the headers that are being imposed on me
Code: Select all
<?php header('Content-Type: text/html; charset=ISO-8859-1'); ?>
I simply added this to the top of each page before the HTML tag, which now seems to work as desired
I fixed this post with the solution in case anyone else has been experiencing problems with older content that is not necessarily UTF-8 friendly etc
I am using PHP for document assembly so I have to graunch it with a header override, in my opinion that is a problem as negates the header already present in the HTML