masterserver: Expect utf-8 from the clients (#621)

Theoretically, we could use the charset information that's exchanged to do
the right conversions, but everything simply uses utf-8 so that would be
pointless.
Günther Brammer 2011-09-23 01:03:06 +02:00
parent 6b491974e1
commit a6b67b0a78
2 changed files with 7 additions and 8 deletions

View File

@ -14,14 +14,13 @@ header('Content-Type: text/html; charset=utf-8'); //utf-8
require_once('frontend.php');
?>
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<!doctype html>
<html>
<head>
<title>OpenClonk Masterserver</title>
<meta http-equiv='content-type' content='text/html; charset=utf-8'>
<meta http-equiv='content-style-type' content='text/css'>
<link rel='stylesheet' href='masterserver.css' type='text/css'>
<link rel='stylesheet' href='http://www.openclonk.org/header/header.css' type='text/css'>
<meta charset='utf-8'>
<link rel='stylesheet' href='masterserver.css'>
<link rel='stylesheet' href='http://www.openclonk.org/header/header.css'>
</head>
<body>
<?php include("http://www.openclonk.org/header/header.php?p=masterserver"); ?>
@ -44,4 +43,4 @@ require_once('frontend.php');
</div>
</div>
</body>
</html>
</html>

View File

@ -73,7 +73,7 @@ abstract class C4Network {
public static function decodeEntitiyString($string) {
$num = ereg_replace("[^0-9]", "", $string);
$num = octdec($num);
return iconv('Windows-1252', 'UTF-8', chr($num));
return chr($num);
}
}
?>
?>