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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:28:06+00:00 2026-06-18T22:28:06+00:00

To prevent marking my question as "duplicate" here is the "answer" to the similar

  • 0

To prevent marking my question as "duplicate" here is the "answer" to the similar question , which unfortunately doesn’t work.So I have the situation where I type Hebrew text into TextBox and I need to convert each typed letter into standard char codes like those in ASCII table (decimal) for English language.Because converting Hebrew chars directly returns entirely different code( those seem to be Unicode ) I need to convert Hebrew input into English. I tried different Encoder types for Hebrew input conversion :Unicode , UTF8 , UTF16 , "Windows-1255" .I am always getting "?" .

So for example ,possible solution from the question mentioned above is this:

  public static string convertUTF8ASCII(string initialString)
  {
     byte[] unicodeBytes = Encoding.Unicode.GetBytes(initialString);
     byte[] asciiBytes = Encoding.Convert(Encoding.Unicode, Encoding.ASCII, unicodeBytes);
     return Encoding.GetEncoding("Windows-1255").GetString(asciiBytes);
  }

And it doesn’t work.

I have also tried something like this :

  public static int GetASCIICodeFromUnicode(string letter){
     Encoding ascii = Encoding.GetEncoding("Windows-1252");
     Encoding unicode = Encoding.GetEncoding("Windows-1255");

     byte[] unicodeBytes = unicode.GetBytes(letter);

     byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
    
     char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
     ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
     asciiBytes.Length, asciiChars, 0);
     string asciiString = new string(asciiChars);

     return (int)Convert.ToChar(asciiString);
 }

Doesn’t work either.

  • 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-18T22:28:08+00:00Added an answer on June 18, 2026 at 10:28 pm

    By the time you get strings appearing in .NET, it is too late to find out what the keyboard sent out.

    In order to find out what keyboard position was clicked you will need to have a mapping of the Hebrew to English positions – a Dictionary<char,char> is a good candidate data structure for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: There is a very similar question here . Bear with me, however; my
My question is very similar to How to prevent marshalling empty tags in JAXB
There is what appears to be a similar question here I've got a baseform
I have a PayPal IPN PHP file set up which assigns all of the
I am building a web application and have opted to use similar table and
(This is a hypothetical question for discussion, I have no actual problem). Say that
Is there an easy or at least elegant way to prevent duplicate entries in
This question is more a semantic-algorithmic-data-structure question than a F# syntactically question. I have
Existing stack overflow question works great, except I need to prevent the key press
Sorry if this is a silly question :-) Background I have legacy code that

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.