Socket.io - problem with umlaut (ä, ö ü)

Hi,

I am currently developing a client-server application with node.js and MySql as database.
For communication I use socket.io.

So you can understand it better.
Here is an example code.

Client

socket.emit('getSqlDataPreview', sqlObjectId, function (data) {
########## do something ###############
})

Server

    _getSqlDataPreview(sqlObjectId, callback) {
        
        const sqlObject = sqlObjects[sqlObjectId];
        const sqlStatement = sqlObject.statements.preview;
        sqlExecuteQuery(sqlStatement).then(data => {
            callback(data)
        }).catch(error => this._io.emit("notification", "error", error.message));      
    };

My problem is, the callback function is not executed if there is an umlaut (‘ä’, ‘ö’, ‘ü’) in the data variable.
Unfortunately, I do not know why.