Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Retrieving non english characters from grid view [SOLVED]

Retrieving non english characters from grid view [SOLVED]

Scheduled Pinned Locked Moved ASP.NET
cssdatabasehelptutorialquestion
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KittyKit
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • K KittyKit

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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:

      K 1 Reply Last reply
      0
      • L Lost User

        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:

        K Offline
        K Offline
        KittyKit
        wrote on last edited by
        #3

        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 ä?

        L 1 Reply Last reply
        0
        • K KittyKit

          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 ä?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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:

          K 1 Reply Last reply
          0
          • L Lost User

            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:

            K Offline
            K Offline
            KittyKit
            wrote on last edited by
            #5

            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?

            L 1 Reply Last reply
            0
            • K KittyKit

              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?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              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:

              K 1 Reply Last reply
              0
              • L Lost User

                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:

                K Offline
                K Offline
                KittyKit
                wrote on last edited by
                #7

                Sounds great. Thanks a lot.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups