>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.
I do not see the reason of using a text file to test. Why we can not test just strings without files?
If it's not broken, fix it until it is.
My Blog