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. General Programming
  3. C#
  4. How to get German charators

How to get German charators

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 4 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.
  • J Offline
    J Offline
    Jamman
    wrote on last edited by
    #1

    Hi,When I use in sockets "return System.Text.Encoding.ASCII.GetString(buffReceiveData);" It returns a-z,A-Z and 0-9 and some special characters also, But the German characters such as Ä are lost Can any one help me to sort out this issue.

    Jamman

    T G J 3 Replies Last reply
    0
    • J Jamman

      Hi,When I use in sockets "return System.Text.Encoding.ASCII.GetString(buffReceiveData);" It returns a-z,A-Z and 0-9 and some special characters also, But the German characters such as Ä are lost Can any one help me to sort out this issue.

      Jamman

      T Offline
      T Offline
      Tony Richards
      wrote on last edited by
      #2

      Strictly speaking, I don't think the german characters such as ä are not in the ASCII character set. (I'm using http://www.csgnetwork.com/asciiset.html[^] as a reference.) Is it possible for you to use Unicode instead. [Edit] They are part of the extended character set. http://www.dtp-aus.com/ext_set.htm[^] I don't know if the System.Text.Encoding.ASCII.GetString works with them, but it should work if both ends use Unicode. Also, you might be able to use the UTF8 encoding (See http://msdn2.microsoft.com/en-gb/library/ms404377.aspx[^]) [/Edit]

      1 Reply Last reply
      0
      • J Jamman

        Hi,When I use in sockets "return System.Text.Encoding.ASCII.GetString(buffReceiveData);" It returns a-z,A-Z and 0-9 and some special characters also, But the German characters such as Ä are lost Can any one help me to sort out this issue.

        Jamman

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        The ASCII encoding is 7-bit ASCII only, and doesn't contain any special characters. You should use the same encoding that was used to encode the characters into bytes. If the data is "8-bit ASCII", try Encoding.Default.

        Experience is the sum of all the mistakes you have done.

        1 Reply Last reply
        0
        • J Jamman

          Hi,When I use in sockets "return System.Text.Encoding.ASCII.GetString(buffReceiveData);" It returns a-z,A-Z and 0-9 and some special characters also, But the German characters such as Ä are lost Can any one help me to sort out this issue.

          Jamman

          J Offline
          J Offline
          Joachim Kerschbaumer
          wrote on last edited by
          #4

          hi there, as i am using System.Text.Encoding.Ascii nearly everyday for processing german text (i.e. lots of ö's,ä's,ü's,ß's,...) i definitely know that it supports german special characters. i guess that the data you are giving as parameter to System.Text.Encoding.ASCII.GetString() isn't encoded correctly. can you check the correct encoding on the sender side?

          J G 2 Replies Last reply
          0
          • J Joachim Kerschbaumer

            hi there, as i am using System.Text.Encoding.Ascii nearly everyday for processing german text (i.e. lots of ö's,ä's,ü's,ß's,...) i definitely know that it supports german special characters. i guess that the data you are giving as parameter to System.Text.Encoding.ASCII.GetString() isn't encoded correctly. can you check the correct encoding on the sender side?

            J Offline
            J Offline
            Jamman
            wrote on last edited by
            #5

            Thanks buddy , I got the solution.

            S.Akmal

            1 Reply Last reply
            0
            • J Joachim Kerschbaumer

              hi there, as i am using System.Text.Encoding.Ascii nearly everyday for processing german text (i.e. lots of ö's,ä's,ü's,ß's,...) i definitely know that it supports german special characters. i guess that the data you are giving as parameter to System.Text.Encoding.ASCII.GetString() isn't encoded correctly. can you check the correct encoding on the sender side?

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              Joachim Kerschbaumer wrote:

              as i am using System.Text.Encoding.Ascii nearly everyday for processing german text (i.e. lots of ö's,ä's,ü's,ß's,...) i definitely know that it supports german special characters.

              This only works in the latest version of the framework. In earlier versions any characters outside the standard ASCII character set (0-127) were replaced with question marks.

              Experience is the sum of all the mistakes you have done.

              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