Retrieving non english characters from grid view RRS feed

  • Question

  • User-222554233 posted

    Hello there

    My daabase has lots of german characters stored. While I read it from DB and display it in the gidview, everything is fine. The Gridview displays the german characters perfectly in the browser.

    After the display phase, when I read the data from the gridview as gridview.rows[1].cells[2].text, I get some special characters - But the gridview shows the text as 'ä' in the first row, second column. But while reading it back it gives ä

    How to set this right? any help is appreciated. thanks.


    Sunday, May 2, 2010 11:18 AM


  • User1525137291 posted

    Try something like this :

    StringBuilder sb = new StringBuilder ();
    for( int i=0; i< string.Length; i++ )
    if ( (string[i]>='0' and string[i]<='9' ) || (string[i]>='A' and
    string[i]<='z' ) )
    sb.Append( string[i] );

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 2, 2010 8:07 PM