search with international chars - want to replace them.

6 posts, 0 answers
  1. aykut
    aykut avatar
    67 posts
    Member since:
    Oct 2007

    Posted 13 Jan 2014 Link to this post

    hello there,

    I have a combo which is filled with some text in latin chars. and combo works fine, searches fine in latin keyboards. but when user have lets say turkish keyboard search functionality messes up. in server side I replace these characters so sql queries are fine. but bombo itself cannot find right items, which is natural.

    what I nd to do is somehow replace these characters, especially letter "I" with latin equalevent. meaning:

    ı -> i
    İ -> I

    these 2 characters are really pain. I tried to use keypress event events and other samples in forum but all of these events not working for "replacing" character.

    any suggestions ?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Jan 2014 Link to this post


    Please have a look into the following JavaScript to replace a letter with another on onkeyup event of RadComboBox.

    <script type="text/javascript">
        function Replace(event) {
            var combo = $find("<%=RadComboBox1.ClientID %>");
            var val = combo.get_text();
            var len = (val.length) - 1;
            if (event.keyCode == 76) { //if typed key is l, will replace with i
                var res = val.substring(0, len) + "i";
            if (event.keyCode == 73) { //if typed key is i , will replace with l
                var res = val.substring(0, len) + "l";

  3. aykut
    aykut avatar
    67 posts
    Member since:
    Oct 2007

    Posted 14 Jan 2014 Link to this post

    thanks but :
    I think radcombobox searches the drop down list and THEN fires the keyup event. here's what happens:

    then ı press i then radcombo finds item " Iodine "   -capital i, US keyboard
    when I press ı then it finds nothing but changes ı to i

    what I dont understand is international characters are always problem and how programmers deal with it ?
    in turkish character set when I press ı or its capital form İ radcombo should search for i it application localization is english, which in my case it is.

    I face this problem because my application is pure english by web config:
        <globalization fileEncoding="iso-8859-9" requestEncoding="iso-8859-9" responseEncoding="iso-8859-9" culture="en-US" uiCulture="en"/>

    but user keyboard is turkish q or turkish f.

    though the solution not working for me, thank you very much.

  4. Nencho
    Nencho avatar
    1874 posts

    Posted 17 Jan 2014 Link to this post

    Hello aukut,

    I have prepared a sample project for you, demonstrating a possible implementation of the desired functionality. Please give it a try at your end, and let us know the results.

    Note : dll files are removed from the attachment.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  5. aykut
    aykut avatar
    67 posts
    Member since:
    Oct 2007

    Posted 18 Jan 2014 Link to this post

    yeap, thats what I'm looking for. thank you very  much.

    I changed the code as:

                function normalizeCultureSpecificCharacters(text) {
                    var s = text.replace("\u0131", "I");
                    s = s.replace("\u0130", "I");
                    return s;

    and its changing all special international chars now. capitals and small caps. great.
  6. Bunyamin
    Bunyamin avatar
    4 posts
    Member since:
    Jul 2013

    Posted 28 Oct 2015 Link to this post

    i've same problem only for (i AND İ) when radcombobox markfirstmach true,

    i've attached animation gif file

    <telerik:RadComboBox ID="RadComboBox2"  runat="server"
                         DataSourceID="SqlDataSource1" DataTextField="birimadi" AllowCustomText="true" MarkFirstMatch="true" Height="200"
                         DataValueField="birimid" Width="200px" Culture="tr-TR">​

Back to Top