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 3628356
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:00:23+00:00 2026-05-19T00:00:23+00:00

I have this mapping in my C# application string [,] unicode2Ascii = { {

  • 0

I have this mapping in my C# application


string [,] unicode2Ascii = {
{ "ஹ", "\x86" }
};

&#3001 – is the unicode value for a tamil literal “ஹ”. This is the raw hex literal for the unicode value saved by MS Word as a byte sequence. I am trying to map these unicode value “strings” to a hex value under 255 (so as to accommodate non-unicode supported systems).

I trying to use string.replace like this:

S = S.replace(unicode2Ascii[0,0], unicode2Ascii[0,1]);

However the resultant ouput has a ? instead of the actual hex 0x86 stored. Any pointer on how I could set the encoding for the second element of that array to something like windows-1252?

Or is there a better way to do this conversion?

thanks in advance

  • 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-05-19T00:00:24+00:00Added an answer on May 19, 2026 at 12:00 am

    Not sure if this helps, but the Tamil codepage “57004 – ISCII Tamil” is supported by Windows.

    It does not give the same translation for the example character above though. For ‘ஹ’ it gives 216. Perhaps a different codepage needs to be used?

            string tamilUnicodeString = "ஹ";
    
            Encoding encoding = Encoding.GetEncoding("x-iscii-ta");
    
            byte[] codepageBytes = encoding.GetBytes(tamilUnicodeString);
    

    Update

    If you wish to take a unicode file as input, transliterate characters to get a single byte representation, the following should do the trick. The resulting array should have your single byte representation if your dictionary encodes each character:

            Dictionary<char, char> lookup = new Dictionary<char, char>
            {
                { 'ஹ', '\x86' },
                { 'இ',  '\x87' },
                //next pair...,
                //etc, etc.
            };
    
            string input = "ஹஇதில் உள்ள தமிழ் எழுத்துக்கள் சரியாகத் தெரிந்தால்";
    
            char[] chars = input.ToCharArray();
    
            for (int i = 0; i < chars.Length; i++)
            {
                char replaceChar;
    
                if (lookup.TryGetValue(chars[i], out replaceChar))
                {
                    chars[i] = replaceChar;
                }
            }
    
            byte[] output = Encoding.GetEncoding("iso-8859-1").GetBytes(chars);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this mapping defined in my Application Layer: public IList<ProfessionDTO> GetAllProfessions() { IList<Profession>
I have been working on getting this seat mapping chart for a while and
I am using nhibernate and i have code like this in the mapping area:
I have a Hibernate mapping that looks something like this: <class name=MyEntity> <set name=scalarSet
I would like to have a mapping function that does this: public static void
I used the mapping solution from this question to have a joined component. But
I have some troubles mapping a JSON Array to RestKit. This is what the
I have the following mapping setup to take care subdirectories, but with this change
Good Day, I have a Hibernate mapping that looks something like this: public class
This is JavaScript regex. regex = /(http:\/\/[^\s]*)/g; text = I have http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd and I

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.