diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtlocalpeer.cpp qtsingleapplication-2.6_1-opensource/src/qtlocalpeer.cpp
--- qtsingleapplication-2.6_1-opensource.old/src/qtlocalpeer.cpp	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtlocalpeer.cpp	2010-07-16 21:52:15.000000000 -0400
@@ -48,6 +48,7 @@
 #include "qtlocalpeer.h"
 #include <QtCore/QCoreApplication>
 #include <QtCore/QTime>
+#include <QtDebug>
 
 #if defined(Q_OS_WIN)
 #include <QtCore/QLibrary>
@@ -138,6 +139,11 @@ bool QtLocalPeer::isClient()
 
 bool QtLocalPeer::sendMessage(const QString &message, int timeout)
 {
+    return sendMessage(message.toUtf8(), timeout);
+}
+
+bool QtLocalPeer::sendMessage(const QByteArray &message, int timeout)
+{
     if (!isClient())
         return false;
 
@@ -160,9 +166,8 @@ bool QtLocalPeer::sendMessage(const QStr
     if (!connOk)
         return false;
 
-    QByteArray uMsg(message.toUtf8());
     QDataStream ds(&socket);
-    ds.writeBytes(uMsg.constData(), uMsg.size());
+    ds.writeBytes(message.constData(), message.size());
     bool res = socket.waitForBytesWritten(timeout);
     res &= socket.waitForReadyRead(timeout);   // wait for ack
     res &= (socket.read(qstrlen(ack)) == ack);
@@ -195,9 +200,9 @@ void QtLocalPeer::receiveConnection()
         delete socket;
         return;
     }
-    QString message(QString::fromUtf8(uMsg));
     socket->write(ack, qstrlen(ack));
     socket->waitForBytesWritten(1000);
     delete socket;
-    emit messageReceived(message); //### (might take a long time to return)
+    emit messageReceived(uMsg); //### (might take a long time to return)
+    emit messageReceived(QString::fromUtf8(uMsg));
 }
diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtlocalpeer.h qtsingleapplication-2.6_1-opensource/src/qtlocalpeer.h
--- qtsingleapplication-2.6_1-opensource.old/src/qtlocalpeer.h	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtlocalpeer.h	2010-07-16 21:52:15.000000000 -0400
@@ -61,11 +61,13 @@ public:
     QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
     bool isClient();
     bool sendMessage(const QString &message, int timeout);
+    bool sendMessage(const QByteArray &message, int timeout);
     QString applicationId() const
         { return id; }
 
 Q_SIGNALS:
     void messageReceived(const QString &message);
+    void messageReceived(const QByteArray &message);
 
 protected Q_SLOTS:
     void receiveConnection();
diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtlockedfile_win.cpp qtsingleapplication-2.6_1-opensource/src/qtlockedfile_win.cpp
--- qtsingleapplication-2.6_1-opensource.old/src/qtlockedfile_win.cpp	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtlockedfile_win.cpp	2010-07-16 21:52:15.000000000 -0400
@@ -65,7 +65,7 @@ Qt::HANDLE QtLockedFile::getMutexHandle(
 
     Qt::HANDLE mutex;
     if (doCreate) {
-        QT_WA( { mutex = CreateMutexW(NULL, FALSE, (TCHAR*)mname.utf16()); },
+        QT_WA( { mutex = CreateMutexW(NULL, FALSE, (WCHAR*)mname.utf16()); },
                { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } );
         if (!mutex) {
             qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
@@ -73,7 +73,7 @@ Qt::HANDLE QtLockedFile::getMutexHandle(
         }
     }
     else {
-        QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (TCHAR*)mname.utf16()); },
+        QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (WCHAR*)mname.utf16()); },
                { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } );
         if (!mutex) {
             if (GetLastError() != ERROR_FILE_NOT_FOUND)
diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtsingleapplication.cpp qtsingleapplication-2.6_1-opensource/src/qtsingleapplication.cpp
--- qtsingleapplication-2.6_1-opensource.old/src/qtsingleapplication.cpp	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtsingleapplication.cpp	2010-07-16 21:52:15.000000000 -0400
@@ -144,6 +144,7 @@ void QtSingleApplication::sysInit(const 
     actWin = 0;
     peer = new QtLocalPeer(this, appId);
     connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
+    connect(peer, SIGNAL(messageReceived(const QByteArray&)), SIGNAL(messageReceived(const QByteArray&)));
 }
 
 
@@ -265,6 +266,11 @@ bool QtSingleApplication::sendMessage(co
     return peer->sendMessage(message, timeout);
 }
 
+bool QtSingleApplication::sendMessage(const QByteArray &message, int timeout)
+{
+    return peer->sendMessage(message, timeout);
+}
+
 
 /*!
     Returns the application identifier. Two processes with the same
@@ -291,10 +297,14 @@ QString QtSingleApplication::id() const
 void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage)
 {
     actWin = aw;
-    if (activateOnMessage)
+    if (activateOnMessage) {
         connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
-    else
+        connect(peer, SIGNAL(messageReceived(const QByteArray&)), this, SLOT(activateWindow()));
+    }
+    else {
         disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
+        disconnect(peer, SIGNAL(messageReceived(const QByteArray&)), this, SLOT(activateWindow()));
+    }
 }
 
 
diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtsingleapplication.h qtsingleapplication-2.6_1-opensource/src/qtsingleapplication.h
--- qtsingleapplication-2.6_1-opensource.old/src/qtsingleapplication.h	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtsingleapplication.h	2010-07-16 21:52:15.000000000 -0400
@@ -91,11 +91,13 @@ public:
 
 public Q_SLOTS:
     bool sendMessage(const QString &message, int timeout = 5000);
+    bool sendMessage(const QByteArray &message, int timeout = 5000);
     void activateWindow();
 
 
 Q_SIGNALS:
     void messageReceived(const QString &message);
+    void messageReceived(const QByteArray &message);
 
 
 private:
diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtsinglecoreapplication.cpp qtsingleapplication-2.6_1-opensource/src/qtsinglecoreapplication.cpp
--- qtsingleapplication-2.6_1-opensource.old/src/qtsinglecoreapplication.cpp	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtsinglecoreapplication.cpp	2010-07-16 21:52:15.000000000 -0400
@@ -81,6 +81,7 @@ QtSingleCoreApplication::QtSingleCoreApp
 {
     peer = new QtLocalPeer(this);
     connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
+    connect(peer, SIGNAL(messageReceived(const QByteArray&)), SIGNAL(messageReceived(const QByteArray&)));
 }
 
 
@@ -94,6 +95,7 @@ QtSingleCoreApplication::QtSingleCoreApp
 {
     peer = new QtLocalPeer(this, appId);
     connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
+    connect(peer, SIGNAL(messageReceived(const QByteArray&)), SIGNAL(messageReceived(const QByteArray&)));
 }
 
 
@@ -133,6 +135,11 @@ bool QtSingleCoreApplication::sendMessag
     return peer->sendMessage(message, timeout);
 }
 
+bool QtSingleCoreApplication::sendMessage(const QByteArray &message, int timeout)
+{
+    return peer->sendMessage(message, timeout);
+}
+
 
 /*!
     Returns the application identifier. Two processes with the same
diff -rupN qtsingleapplication-2.6_1-opensource.old/src/qtsinglecoreapplication.h qtsingleapplication-2.6_1-opensource/src/qtsinglecoreapplication.h
--- qtsingleapplication-2.6_1-opensource.old/src/qtsinglecoreapplication.h	2009-12-16 05:43:33.000000000 -0500
+++ qtsingleapplication-2.6_1-opensource/src/qtsinglecoreapplication.h	2010-07-16 21:52:15.000000000 -0400
@@ -62,10 +62,12 @@ public:
 
 public Q_SLOTS:
     bool sendMessage(const QString &message, int timeout = 5000);
+    bool sendMessage(const QByteArray &message, int timeout = 5000);
 
 
 Q_SIGNALS:
     void messageReceived(const QString &message);
+    void messageReceived(const QByteArray &message);
 
 
 private:
