HI,

I have a software which gives me a text file which consist of German characters and are stores in the notepad with space. When I open it with note-tab software initially the german character is stored as space but they have a option " convert to ASCII text" then suddenly it showed all the strange characters.

So, I also tried to convert the text to ASCII but when I run it it is just returning me "?" instead of character.

My code is

private void button13_Click(object sender, EventArgs e)
    {
      string str = "Mller,J.A."; // It should be converted to Müller,J.A.
      string inputString = textBox15.Text; 
      Encoding encoder = ASCIIEncoding.GetEncoding("us-ascii", new EncoderReplacementFallback(string.Empty), new DecoderExceptionFallback());
      byte[] bAsciiString = encoder.GetBytes(inputString);
      string cleanString = Encoding.ASCII.GetString(bAsciiString);
      MessageBox.Show(cleanString);
    }

I got it from Google. Is there something that I have to edit so that I can show German characters?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.