i use it like this

 function MySQLConnect(ip, user, password, database) {
        var sql = new Ape.MySQL(ip + ":3306", user, password, database);
        //onConnect callback
        sql.onConnect = function() {
            Ape.log('Sie sind jetzt mit dem MySQL server Verbunden');
        }
        //onError callback
        sql.onError = function(errorNo) {
            Ape.log('Verbindungsfehler ' + errorNo +' '+
this.errorString());
        }
        return sql;
 }
var sql = MySQLConnect('127.0.0.1', 'myroot', 'ape', 'allvsall');
sql.query("SET NAMES 'utf8';", function(res, errorNo) {
        if (errorNo == 8) {
            // any error ? connection was closed

             // reconnect with mysql server
                        }
    });
(function() {
        sql.query("SELECT 1;", function(res, errorNo) {
            if (errorNo == 8) {
                //Irgendwas ist falsch gelaufen , die Verbindung wurde
geschlossen
                sql =  MySQLConnect('127.0.0.1', 'myroot', 'ape',
'allvsall');
                // Wieder verbinden mit dem MySQL Server
                    sql.query("SET NAMES 'utf8';", function(res, errorNo) {
            if (errorNo == 8) {
                // any error ? connection was closed

                // reconnect with mysql server
            }
        });
            }
        }.bind(this));
    }).periodical(1000*60*2);



be sure you have all utf-8 in your database , if not it cant convert or at
least it should never ...


On 29 November 2012 22:25, RakonDark <[email protected]> wrote:

> do you have your result inserted as UTF-8
>
> and well log files i dont know what it use , maybe only ascii
>
> for me it works perfekt , since i have all in utf-8 the script the datas
> in the table and with this querry after connect , all
> world letters are show right.
>
>
> On 29 November 2012 22:10, Nicolas <[email protected]> wrote:
>
>> Thanks. Unfortunately, that does not help.
>>
>> On the APE server, l can Ape.log() this:
>>
>> D�d�laz�pe
>>
>> instead of:
>>
>> Dédélazöpeü
>>
>> and the same is subsenquently received and printed by the client.
>>
>> Any idea?
>>
>>
>>
>> Le jeudi 29 novembre 2012 18:54:20 UTC, RakonDark a écrit :
>>>
>>> i use UTF-8 on the MySQL
>>>
>>> query this
>>>
>>> SET NAMES utf8
>>>
>>> maybe that helps
>>>
>>>
>>> On 29 November 2012 19:39, Nicolas <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I receive strings from a Mysql query from APE server.
>>>>
>>>> When these strings have accents, the string has weird characters. Once
>>>> sent to the client, I don't know how to decode them.
>>>>
>>>> Either I need to decode the string on the server side or on the client
>>>> side. How can I do that?
>>>>
>>>> Nicolas.
>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "APE Project" group.
>>>> To post to this group, send email to [email protected]
>>>>
>>>> To unsubscribe from this group, send email to
>>>> ape-project...@**googlegroups.com
>>>>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/ape-project?hl=en<http://groups.google.com/group/ape-project?hl=en>
>>>> ---
>>>> APE Project (Ajax Push Engine)
>>>> Official website : http://www.ape-project.org/
>>>> Git Hub : http://github.com/APE-Project/
>>>>
>>>
>>>
>>>
>>> --
>>> i cant trust, what i not know
>>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "APE Project" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/ape-project?hl=en
>> ---
>> APE Project (Ajax Push Engine)
>> Official website : http://www.ape-project.org/
>> Git Hub : http://github.com/APE-Project/
>>
>
>
>
> --
> i cant trust, what i not know
>



-- 
i cant trust, what i not know

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to