I´m trying to compare two values generated using Hash and Base64encode, one local, the other retreived from a Sql Db.
In the one I retreive from DB, the plus symbol "+" is replaced by a "space". all other caracters of the string remains the same.
I googled and find various comments mentioning the same issue...
Can anyone tell me:
!) if they have also faced this issue in the past ? and
2) how to possibly get arround the problem - in LC - with a quick solution (other encoding maybe, change DB field format...
(...without having to learn another coding language )
Here are the 2 strings, I store each in 2 fields before I start to compare them...
String 1
Code: Select all
k/DATXDPBQnk9efENHIc2+cWIPKFrzuObg3azWYthAUqUPbpelBdzs0VGno6M+yPc8D5+S3Y
eTnq9QaunubWJA==
Code: Select all
k/DATXDPBQnk9efENHIc2 cWIPKFrzuObg3azWYthAUqUPbpelBdzs0VGno6M yPc8D5 S3Y
eTnq9QaunubWJA==
LC Comparing Code:
Code: Select all
on mouseup
if fld "res1" is fld "res2" then
put "Same string" into fld "info"
else
put "different strings" into fld "info"
end if
end mouseup
I have a test entry in the database whose description is:
AAA `~!@#$%^&*()_+-={}|[]\:";'<>?,./ And wow this has a lot of special characters.
With the code above, for some reason when the request gets to the controller, the description loses the + sign (it becomes just a space).