>>>>I don't have the ID of the message (it has been almost 10 years since I got his code). And I don't care how he created this function (btw, "born" is a poor choice of a word :) ). His function works for me.
>>>>
>>>>>Here is what I found
>>>>>
>>>>>
https://www.berezniker.com/content/pages/visual-foxpro/vfp-implementation-cipher-encryption>>>>>
>>>>>So it does seem to be the same algorithm just in VFP code.
>>>
>>>BTW, in that page the code is not shown properly for me. It's truncated.
>>>
>>>I am saying, that the C# implementation is not working for high ASCII values and for us it's critical to make it work for all characters.
>>
>>Is it possible that you are not encoding the VFP string correctly? Viv's code is using encoding 1252.
>
>I am sending you in private our current VFP code we want to reproduce in C#. I haven't written this code, so it's new for me as well.
I think your approach in trying to apply Viv and Sergey's code is wrong. You sent me a huge code that has not relevance to the issue of testing encoding and decoding. First, you should use Sergey's function (and not C function in the fll) because this is what Viv used as the basis for his code. Secondly you need to create a simple .txt file where you store a string to be encoded and decoded. Then apply Sergey's function to this simple test text file (that probably should include your high-ascii characters). Then apply Viv's function to the encoded string and see if the result is the same as original string.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham