Re: pear ajax and accented letters

From: Date: Mon, 16 Jan 2006 20:14:06 +0000
Subject: Re: pear ajax and accented letters
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22552@lists.php.net to get a copy of this message
For multi-byte characters to work the mbstring extension is required. I think there is a PHP only implementation or something we could try, but for now the best bet is to turn on the mbstring extension. http://us3.php.net/manual/en/ref.mbstring.php I'm tracking supporting things besides mbstring at: http://pear.php.net/bugs/bug.php?id=6501 -josh Adi wrote:
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...


« previous php.pear.general (#22552) next »