Retrieving non english characters from grid view [SOLVED]
-
Hello My database has lots of german data stored. While I read it and display in the gridview, everthing works fine. The Grdview displays the german characters perfectly in the browser. After the display phase, I read a data from the gridview cells as gridview1.rows[1].cells[2].text, it returns special characters. For eg, 1st row, 2nd column in gridview has ä which is displayed in the browser properly, when I read the same from codebehind, it shows ä How to set it right? any help is deeply appreciated. thanks Kit
modified on Monday, May 3, 2010 5:19 AM
-
Hello My database has lots of german data stored. While I read it and display in the gridview, everthing works fine. The Grdview displays the german characters perfectly in the browser. After the display phase, I read a data from the gridview cells as gridview1.rows[1].cells[2].text, it returns special characters. For eg, 1st row, 2nd column in gridview has ä which is displayed in the browser properly, when I read the same from codebehind, it shows ä How to set it right? any help is deeply appreciated. thanks Kit
modified on Monday, May 3, 2010 5:19 AM
That's another representation of the same character; similar to decimal or binary being another representation of a number. It should display correctly as "A umlaut" when you display it again in the browser, or when you save it to a file. Conversely, you could try to check the string using a
Debug.WriteLine
statement.I are Troll :suss:
-
That's another representation of the same character; similar to decimal or binary being another representation of a number. It should display correctly as "A umlaut" when you display it again in the browser, or when you save it to a file. Conversely, you could try to check the string using a
Debug.WriteLine
statement.I are Troll :suss:
-
Well, I am acutally exporting the datatable to Excel. And I dont see ä in excel, instead I see the numbers and special characters. How to make the excel display ä?
KittyKit wrote:
Well, I am acutally exporting the datatable to Excel. And I dont see ä in excel, instead I see the numbers and special characters. How to make the excel display ä?
You can reverse the HTML-coding using the HtmlDecode[^] method :)
I are Troll :suss:
-
KittyKit wrote:
Well, I am acutally exporting the datatable to Excel. And I dont see ä in excel, instead I see the numbers and special characters. How to make the excel display ä?
You can reverse the HTML-coding using the HtmlDecode[^] method :)
I are Troll :suss:
-
Oh my goodness! This is what I was looking for since noon :) Thanks a ton! PS: Will it be a performance hit if I decode it in a loop which has -say - a 100 iterations?
-
You're welcome :)
KittyKit wrote:
Will it be a performance hit if I decode it in a loop which has -say - a 100 iterations?
Not much, it's a fast string-operation. You should be allright :)
I are Troll :suss: