ich habe ein mir unverständliches Problem.
In einer Chatanwendung ("Prochatrooms"), die ich zu phpBB nutze, werden die deutschen Umlaute nur im Usernamen (soll heißen: im Chattext kann man ganz normal Umlaute schreiben) nicht dargestellt, obwohl sie im Quelltext der HTML-Seite aber angezeigt sind.
In der Liste der User die gerade im Chat online sind, erscheint der Name des User "Umlaut-PrüfungÜÖÄ" so: "Umlaut-Pr��"
Wenn ich aber den Quelltext der Seite aufrufe, dann steht dort der Name richtig mit deutschen Umlauten (ziemlich in der Mitte, Zeile beginnt mit var thisUserRef) drin:
Code: Alles auswählen
<html>
<head>
<title> </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script language="javascript">
<!--
var xmlHttp;
function showUser()
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
var url="userlist.php";
url=url+"?room=Lobby";
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("showlist").innerHTML=xmlHttp.responseText;
if (document.getElementById('showlist').innerHTML.indexOf("pm_3a65x_x805g")!=-1)
{
parent.window.location = "logout.php";
}
if (document.getElementById('showlist').innerHTML.indexOf("npm__3a65x__x806g")!=-1)
{
window.frames["pm"].location.href='private_request.php';
}
setTimeout('showUser();',5000); // 2 second refresh
}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
//Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
function privChat(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=650,height=530,left=212,top=134');");
}
function viewCam(theUser){
window.frames["user_options"].location.href='user_options.php?gud=' + theUser + '&v=1';
}
//Contents for menu 1
var menu1=new Array()
function gotUser(theUser, theUserID, theUserIP){
var refUser = theUserID;
var thisUserRef = 'Umlaut-PrüfungÜÖÄ';
if(thisUserRef!=refUser){
menu1[0]='<a class="user" href="javascript:privChat(\'private.php?u=' + theUser + '\')">» Private Chat</a>'
menu1[1]='<a class="user" target="_blank" href="../forum/profile.php?mode=viewprofile&u=' + refUser + '">» View Profile</a>'
menu1[2]=''
}else{
menu1[0]='<a class="user" target="_blank" href="../forum/profile.php?mode=viewprofile&u=' + refUser + '">» View Profile</a>'
menu1[1]=''
menu1[2]=''
}
}
// -->
</script>
<script language=JavaScript src="dropdown.js" type=text/javascript></script>
</head>
<body onload="showUser()" class="body" marginwidth="10" marginheight="0" leftmargin="10" rightmargin="10" topmargin="0" bottommargin="0">
<div class="showlist" id="showlist" style="height:85%;" />Loading...</div>
<table align="center">
<tr><td valign="top">
<IFRAME name="user_options" SRC="user_options.php" style="height:0px;width:0px;" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" allowtransparency="yes"><P>Sorry, your browser doesnt support iframes.</P></IFRAME>
<!--
DO NOT REMOVE THE COPYRIGHT NOTICE LINE BELOW UNLESS YOUR LICENCE TYPE PERMITS THIS.
REMOVAL OF THE COPYRIGHT INFORMATION WITHOUT PERMISSION WILL TERMINATE YOUR LICENCE.
-->
<center>
<a class="copyright" href="http://www.prochatrooms.com" target="_blank" alt="Powered By ProChatRooms.com" title="Powered By ProChatRooms.com">© Pro Chat Rooms</a>
</center>
</td></tr>
</table>
<iframe id="pm" name="pm" src="private_request.php" style="width: 0px; height: 0px; border: 0px;"></iframe>
</body>
</html>
Ich vermute, dass es an eben diesem Javascript liegt, dass es bei Umlauten nicht funktioniert, denn alle andere Programmteile des Chats (Chatfenster, Privatchat usw) akzeptieren Umlaute.
Ist mir noch zu helfen?