There and Back Again

HTML_AJAX 0.2.1 Released

I just released HTML_AJAX 0.2.1, if your running 0.2.0 you’ll want to upgrade immediatly since this fixes a bunch of bugs I added in that version.

The main changes are:
Bugs:
Remove debug message when throwing an exception
Fix problems with async calls
Fix broken content-type detection
Stop trying to run an init method when the init flag isn’t set
PHP required version moved to 4.1.0 which is what it should need

Features:
A basic debug class has been added, allowing you to write PHP errors to a file
HTML_AJAX.replace now works async

Also there is now a mailing list for HTML_AJAX.

5 thoughts on “HTML_AJAX 0.2.1 Released

  1. ilcomi

    I try to use HTML_AJAX 0.2.1 but i can return string, object or array contains character like “à è ì ò ù”.

    For example:
    In your example file “proxy_usage_server.php” when i change the string
    “I’m a async call”
    in
    “I’m a async call and this is a à”
    the result is:
    “Fatal error: Call to undefined function mb_convert_encoding() in /usr/local/lib/php/HTML/AJAX/JSON.php on line 116”

    I think there is an error for encoding string, is correct?

    Thanks
    ilcomi

  2. ilcomi

    For my question before maybe I must enable in my php the mbstring extension?

    thanks

  3. Joshua Eichorn Post author

    I would try things with the mbstring extension turned on. I think someone has a patch that uses iconv instead but its not in svn yet.

  4. boo

    Hey ilcomi

    I just spent LOTS of time trying to get something similar to work.
    (binary strings in my case)

    this is my solution, which works around installing the mbstring functions:

    header(“Content-Type: text/plain; charset=utf8”);
    require_once(‘I18N_UnicodeString/I18N_UnicodeString.php’);
    //get it from: http://pear.php.net/package/I18N_UnicodeString
    $u = new I18N_UnicodeString($your_str, ‘HTML’);
    $output = $u->toUtf8String();

    try, modify and have fun:)
    hope this helps

    /boo

  5. boo

    Ooops:
    you’ll want the charset, but probably not the Content-Type text/plain.
    change it to fit your needs: eg. text/html, etc.

    /boo