Oh, OK, I should write them inside of array (i.e. use
QCborStreamWriter::startArray). Sorry... xD
On 5/20/2022 6:28 AM, Alexander Dyagilev wrote:
Hello,
I'm trying to write and read 2 byte arrays. Getting assertion failure
when reading second array.
Write:
QByteArrayba;
QCborStreamWriter
Hello,
I'm trying to write and read 2 byte arrays. Getting assertion failure
when reading second array.
Write:
QByteArrayba;
QCborStreamWriterw(&ba);
QByteArraya1(10,'A');
QByteArraya2(10,'B');
w.append(a1);
w.append(a2);
Read:
QByteArrayreadByteArray(QCborStreamReader&cbor)
{
Q_ASSER
On Thursday, 19 May 2022 09:41:03 PDT Alexander Dyagilev wrote:
> Hello,
>
> One can easily write it to socket. E.g.
>
> socket->write(value.toCbor());
>
> But how to read it then? It seems it's not possible.
I have yet to properly implement continued parsing with QCborValue.
QCborStreamReader
Hello,
One can easily write it to socket. E.g.
socket->write(value.toCbor());
But how to read it then? It seems it's not possible.
I.e. the following solution:
MyClient::MyClient()
{
QCborStreamReader cborReader = new QCborStreamReader(socket);
}
MyClient::onReadyRead()
{
QCborValue
On Thu, 19 May 2022, Alvin Wong wrote:
> > Windows were all DBCS. It might not be worth fixing the codec implementation
> explicitly in docs that MBCS uses longer than 2 bytes per character,
AIUI it is so that:
• SBCS: all characters are one byte and one screen column
• DBCS: all characters ar
Hi,
> > This gave me an idea: perhaps the easiest way for Qt to fix it would
> > be to check `GetACP() == CP_UTF8`, and if it is true then just use
> > Qt's built-in UTF-8 support and bypass MultiByteToWideChar completely.
>
> Indeed. And given that the UTF-8 codec is highly optimised, it will be