How to get German charators
-
-
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
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]
-
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
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.
-
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
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?
-
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?
-
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?
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.