I have a text file exported from a Foxpro (Dos-based) program, but this text contains non-English characters ( arabic [ right to left ] ) and now exported strings are like this “¤“îگüَن” .
is there any way to convert them back to their original values ?
You should read the data with the proper code page.
Invoke the function with the right code page ID, for MS-DOS Arabic it should be “708”, for a complete list you can start on Wikipedia.
Solution with look-up table to translate from unsupported encodings (mapping is required only for charactes > 127):
An example of translation table: