Re: pear ajax and accented letters
| From: | Adi | Date: | Mon, 16 Jan 2006 19:57:41 +0000 |
| Subject: | Re: pear ajax and accented letters | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22551@lists.php.net to get a copy of this message | ||
myServer.php:
<?php
include "HTML/AJAX/Server.php";
class mytestclass {
function whatever($string) {
return ">>>".$string;
}
}
//SYM_AjaxSpellCheckServer
class test_server extends HTML_AJAX_Server
{
var $initMethods = true;
var $clientJsLocation =
"/data/local/www2/newFramework/lib/pear/HTML/AJAX/js/";
function initmyTestClass() {
$this->registerClass(new mytestclass());
}
}
$server = new test_server();
$server->handleRequest();
?>
index.php:
<html>
<head>
<script
type='text/javascript'
src="myServer.php?stub=mytestclass&client=all"></script>
<script>
AjaxCallback =
{
whatever: function(resultFromServer) {
document.getElementById('resultDisplay').innerText =
resultFromServer;
}
}
myRemoteClass = new mytestclass (AjaxCallback);
function doIt() {
myRemoteClass.whatever (document.getElementById('myMessage').innerText);
}
</script>
<style>
.editArea {
border-style: solid;
border-color: black;
border-width: 1px;
width: 450px;
height: 200px;
overflow: auto;
}
</style>
</head>
<body>
<span contenteditable=true id='myMessage' class='editArea'>
caractères de Français du besoin</span><br>
<input type=button value='Do it' onClick='javascript:doIt();'><br>
<br>
<span contenteditable=true id='resultDisplay'
class='editArea'></span><br>
</body>
</html>
This results in the following being returned to me:
<br />
<b>Fatal error</b>: Call to undefined function mb_convert_encoding() in
<b>/data/www2/newFramework/lib/pear/HTML/AJAX/JSON.php</b> on line
<b>116</b><br />
Thanks for your time...