Re: pear ajax and accented letters

From: Date: Thu, 19 Jan 2006 21:52:17 +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-22616@lists.php.net to get a copy of this message
Adi wrote:
...the final chapter... So....after all this trouble I've been having with sending data(accented characters) back and forth to the server with this ajax package here is what worked for me in the end... From the client: - urlencode my string - send it to my server via the ajax sutb(s) At the server - url decode my string - do sting manipulation(i am actually working on a spellcheck module) - mb_convert_encoding($myString, 'UTF-8') and off goes my array of objects back to the client This setup works for me...thank you so much for all your help Joshua. Adam. Glad you got it working, i wish it was less of a hassle but PHP and UTF-8 gets pretty scary.
-josh
On 1/18/06, Christian Rodriguez <car@cespi.unlp.edu.ar> wrote:
I don't know if the same problem applies to yours, but I'll tell you mine. I had the same problem, when trying to implement a kind of ajax autocomplete. So I realized that I need to use UTF-8 encoding instead of iso8859-1. Imagine your Ajax server needs to return some data stored in a $data variable, then it should return it like this:
    return iconv("ISO-8859-1", "UTF-8",$data);
Good luck Christian Adi wrote:
    
Hello everyone...I am having a tough time with this package trying to
pass
accented letters back to the server. The HTML_AJAX stub blows up whenever
I
send characters that are of ASCII code 128 or higher...I tried to base64
encode the characters which also resulted in a 'syntax errors' Please advise... Adam.
      
-- Take care... Adam


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