Well Scott, i tried as you said, remove the %Trim, but the problem now is that now we've the blanks of the signature field on the encoded field as you can se, and besides that the encoded isnt correct either, the last characters should be UA= and not UB and then followed by all the blanks . Encoded ...