receive with UTF fix
This commit is contained in:
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||
project(CD)
|
||||
set(CD_MAJOR 1)
|
||||
set(CD_MINOR 1)
|
||||
set(CD_REVISION 0)
|
||||
set(CD_REVISION 1)
|
||||
set(CD_SUFFIX )
|
||||
set(CD_COMPANY SHS)
|
||||
set(CD_DOMAIN org.SHS)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "cdutils_parser.h"
|
||||
#include "piconfig.h"
|
||||
#include "pifile.h"
|
||||
#include "piiobytearray.h"
|
||||
#include "piiostring.h"
|
||||
|
||||
@@ -441,8 +440,7 @@ void CDCore::procReceivedPacket(PIByteArray & ba) {
|
||||
PIByteArray k;
|
||||
ba >> k;
|
||||
k << uchar(0);
|
||||
PIString s = PIString::fromUTF8((const char *)k.data());
|
||||
PIIOString ios(&s);
|
||||
PIIOByteArray ios(k);
|
||||
cd_read(&k_, &ios);
|
||||
K_Received();
|
||||
piCoutObj << "K received";
|
||||
@@ -457,8 +455,7 @@ void CDCore::procReceivedPacket(PIByteArray & ba) {
|
||||
PIByteArray x;
|
||||
ba >> x;
|
||||
x << uchar(0);
|
||||
PIString s = PIString::fromUTF8((const char *)x.data());
|
||||
PIIOString ios(&s);
|
||||
PIIOByteArray ios(x);
|
||||
cd_read(&x_, &ios);
|
||||
x_selected = x_.collectX();
|
||||
X_Received();
|
||||
@@ -494,8 +491,7 @@ void CDCore::procReceivedPacket(PIByteArray & ba) {
|
||||
PIByteArray c;
|
||||
ba >> c;
|
||||
c << uchar(0);
|
||||
PIString s = PIString::fromUTF8((const char *)c.data());
|
||||
PIIOString ios(&s);
|
||||
PIIOByteArray ios(c);
|
||||
cd_read(&c_, &ios);
|
||||
C_Received();
|
||||
} break;
|
||||
@@ -512,11 +508,10 @@ void CDCore::procReceivedPacket(PIByteArray & ba) {
|
||||
case CD_MQuery: send(CDType::cdM); break;
|
||||
case CD_MSend: {
|
||||
piCoutObj << "M received";
|
||||
PIByteArray c;
|
||||
ba >> c;
|
||||
c << uchar(0);
|
||||
PIString s = PIString::fromUTF8((const char *)c.data());
|
||||
PIIOString ios(&s);
|
||||
PIByteArray m;
|
||||
ba >> m;
|
||||
m << uchar(0);
|
||||
PIIOByteArray ios(m);
|
||||
cd_read(&m_, &ios);
|
||||
M_Received();
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user