Welcome! Log In Create A New Profile

Advanced

[WD19] How to remove all Empty space in a string

Posted by Mujahid 
[WD19] How to remove all Empty space in a string
December 30, 2018 11:27AM
Hi All,

My software is default by Unicode setting.

Im doing a Crypt(sAddstring,"abc123",cryptAnsi) but at the final result, it is appear many empty space inside the string.

When im using Trace() its appear this <\r><\n> symbol such as below example :

U1NQT1MJSEdBRTEtQzM0RDEtRDg1RjAtR0dCNzktNjc3Q0ItM0hHMkMtQTY4RDQtNDc1QkUtNUhHSEgt<\r><\n>QkhGRDctM0RBRzYJMQktCUJJU05FUyBQT1dFUiBSQU5HRVJTCUN5YmVyamF5YSBTZWxhbmdvcgk2MzAw<\r><\n>MAktCS0JYWN0aXZhdGlvbmxpc3RAc2FsYW1zeXN0ZW0uY29tCS0JCTk5.

So this <\r><\n> symbol = empty space

I have try using Nospace and Replace function but still cannot remove this empty space.

How to solve this?

Thanks a lot.

Regards,
Mujahid
Re: [WD19] How to remove all Empty space in a string
December 30, 2018 02:58PM
Hi,
I don't believe that this is "empty space" - it's just characters interpreted by your computer => screen as that what you can see. Removing that "space" will have disastrous result when uncrypting the string.

1 - Danger! You should use a FORMAT of encryption. Otherwise no encryption at all takes place!!
So, it is Crypt(sAddString, "abc123",cryptAnsi, encodePCS)

2 - I'd recommend to use Crypt(YourString,YourPassword,CryptRC516,encodePCS) if possible ... didn't test that with Unicode characters.

Kind regards,
Guenter Predl
office@windev.at
Re: [WD19] How to remove all Empty space in a string
January 01, 2019 11:42PM
Hi Guenter Predl,

The empty space make UnCrypt become error. We need to remove the empty space.

What im doing is, firstly save the Crypt string to datafile. Then call it back and do Replace(). Its work. smiling smiley

Thanks for the tips for Crypt(YourString,YourPassword,CryptRC516,encodePCS). I was use you advise. To make it work i need to set the Crypt string as ANSI string.

Thanks a lot. grinning smiley

Regards,
Mujahid
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: