Input validation of qrz.com data going wrong

6 posts / 0 new
Last post
dl1mtg
dl1mtg's picture
Input validation of qrz.com data going wrong

Hello CQRLOG,

yesterday I had a short FT8 QSO on 10m with BD7BS. QSO was fine.
(QRZ.com-Link: https://www.qrz.com/db/BD7BS)
I tried to log this QSO and CQRLOG ended up in an error / warning:

"TMySQL57Connection: Error executing query: Incorrect value:
'\xE5' for column 'cqrlog001'.'cqrlog_main'.'state' at row 1

Press OK to ignore...
Press Abort to kill program."

Zhang Hong Gang seems to use special chinese characters at his qrz.com site.
I enabled to use qrz.com-data when logging a qso.

Please check and have a look at this (small) isse.

HNY,
73 de Martin, DL1MTG

oh1kh
Input validation of qrz.com data going wrong

Hi Martin!
You didn't specify Cqrlog version. That kind of problem existed in past.
I remember I was corrected then.
How ever it was more than a year ago, lots of fixes after that.

--
Saku
OH1KH

oh1kh
Input validation of qrz.com data going wrong

Hello Martin!

Now I had little time to test and made a fake qso with BD7BS. I already had a qso with him, but then used HamQTH and all went ok then.
Changed to QRZ and, yes, it really causes error.
What I was remembering was problems with name or qth columns when foreign characters were used.

I have to check how this was resolved in past and try to make fix.

Thanks for reporting!

--
Saku
OH1KH

oh1kh
Input validation of qrz.com data going wrong

Hi again!

There is following problem:
dData.SaveQSO procedure has few "cutting copies" to ensure that string from input column is not longer than database column.

qsl_via := copy(qsl_via,1,30);
award := copy(award,1,50);
state := copy(state,1,4);
dok := UpperCase(copy(dok,1,12));
cont := UpperCase(copy(cont,1,2));
qth := copy(qth,1,60);

How ever this kind of "copy" command does not support UTF8 copy.
Length of BD7BS's state looks out as two characters. How ever "copy" sees there 6 characters and cuts two of them away causing non-UTF8 compatible string.
The command should be "UTF8copy".

Cutting copies are remainders from old versions of Cqrlog. For some time now Cqrlog has had proper settings in column lengths of NewQSO and user can not type in longer than database table maxlength of string.
That makes those cutting copies unnecessary, unless adif import from foreign log programs do need them. That has to be checked and if so replace "copy" with "UTF8copy".
Otherwise those lines can be removed.

I think this will fix problems with state, and possibly also with other columns.

--
Saku
OH1KH

oh1kh
Input validation of qrz.com data going wrong

By the way that kind of "state" in ADIF file silently leaves qso out of adif import !

--
Saku
OH1KH

dl1mtg
dl1mtg's picture
Input validation of qrz.com data going wrong

Hello Sako,

many thanks for your quick fix!

I was using version 121, compiled from source.
Today I tried 122 and it accepted the QSO and QRZ.COM data from BD7BS.

It might be take some time to check the ADIF export function :-) Thanks for the hint!
73 de Martin, DL1MTG

--
73 de Martin, DL1MTG