Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8095919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:17:52+00:00 2026-06-05T21:17:52+00:00

I have a text file exported from a Foxpro (Dos-based) program, but this text

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:17:55+00:00Added an answer on June 5, 2026 at 9:17 pm

    You should read the data with the proper code page.

    public static string ReadFile(string path, int codepage)
    {
        return Encoding.GetEncoding(codepage)
            .GetString(File.ReadAllBytes(path));
    }
    

    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.

    string content = ReadFile(@"c:\test.txt", 708);
    

    Solution with look-up table to translate from unsupported encodings (mapping is required only for charactes > 127):

    public static string ReadFile(string path, byte[] translationTable, int codepage)
    {
        byte[] content = File.ReadAllBytes(path);
        for (int i=0; i < content.Length; ++i)
        {
            byte value = content[i];
            if (value > 127)
                content[i] = translationTable[value - 128];
        }
    
        return Encoding.GetEncoding(codepage)
            .GetString(content);
    }
    

    An example of translation table:

    Index    Original (IS)    Translated (1256)
    ...
    13       141              194
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have exported a CSV file from a database. Certain fields are longer text
I have exported data from a text file to an excel sheet, with the
I have a json file exported from phpmyadmin, it looks like this(utf-8 file): [{user_email:
I have Text file that contains data separated with a comma , . How
I have text file with some text information and i need to split this
I have a text file that contains a list of filenames, minus the extension,
I want to filter the data from a text file in unix. I have
I have text file(test.data), which include(this is just example other files have more values....)
I have text file format like this SKI SKII SKIII SKIV SKV SKVI SKVII
I have text file (seq.fasta) which contains sequence as follows M1 MPMILGYWNVRGLTHPIRMLLEYTDSSYDEKRYTMGDAPDFDRSQWLNEKFKLGLDFPNL PYLIDGSHKITQSNAILRYLARKHHLDGETEEERIRADIVENQVMDTRMQLIMLCYNPDF EKQKPEFLKTIPEKMKLYSEFLGKRPWFAGDKVTYVDFLAYDILDQYRMFEPKCLDAFPN

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.