how to change keypress charecter to other unicode charecter by replacing it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ferdous ahamed
    New Member
    • Jan 2011
    • 1

    how to change keypress charecter to other unicode charecter by replacing it?

    Hi All..

    I am ferdous from Bangladesh.I want to make a spell checker application for Bangali language.Alread y i have made a rich text box by using C# language.I can write only english language on it.But when i try to write bangla by using bangla keyboard then my program does not work.Now i am trying to use unicode for bangla that means range(u0980-uo9FF) but i cant.I want to replace input char to bangla unicode char.suppose when i am pressing char 'j' from my keyboard then unicode char 'ক' will be visible on the textbox instead of char 'j'.I have tried lots of time but could not do this.I dont know what actions are needed to do this.

    so,my request to all,if u know this approach then please help me.

    ferdous
  • Samuel Jones
    New Member
    • Jan 2011
    • 48

    #2
    Because i don't have the Bangali Language set on my computer you will need to try this.

    WARNING: you realise you are trying to encode an entire keyboard of keys. This will get messy.

    Apologies if you don't use visual c# to create your programs.

    On your input (ie. a textbox), add an event handler to its KeyDown event.

    (Label1 is the output box)

    Add this code:

    Code:
    private void textbox1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.A) // Character to replace
            label1.Text = label1.Text + "\u1111"; // Unicode to print (replace 1111)
    }
    As i said, this will be messy, you will need this for every letter you replace.

    Try to engineer a way around it if you can and if you do can you post the result please.

    Comment

    Working...