Corrupted link when sending an email

I am experimenting an aleatory problem with emails my app is sending.
It is supposed that the App have to prepare and send a link like as follows:
But instead is sending this other link: %20CRDP-MU78XC21VB5A&IDTurno=413E9890-B447-45E7-AA13-829CDC58FA39
Notice that the difference are the following characters %0D%20
The link is prepared as a sum of a few variables. The one that is part of the link and is one of the two parameters included in the link I am pretty sure that it contains the right value, but when the link belongs as part of the body HTML text, sometimes and only sometimes, includes characters in the form %XX that corrupts the link.
Any idea why this could aleatory happened ?

Yes, if you post your code. The %0D%20 means that you are missing an EncodeURL or a EncodeQuotedPrintable.

Another idea: if you concatenate values make sure to trim them before concatenation.

A %20 is a space and %0D a newline. As Beatrix advises if you trim the variables before concatenation these will not be present in the final string.

Thanks Beatrix I will try your recomendations.
The strange thing is that it is random (or it seams to be random)

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.