1

I have a small programm that replace strings that contains umlauts, apostrophes etc.
But sometimes I haven broken strings that contains for example A¶ for ü, A¼ (or ü) for ö, and so on.
Is there a way to fix these strings?

I just tried to use another replace statement

  str = str.Replace("A¶", "ü");
  str = str.Replace("A¼", "ö");
  str = str.Replace("ü", "ö");

But this do not work for me

Lucas
  • 3,376
  • 6
  • 31
  • 46

1 Answers1

1

It looks like because they are non-standard characters it is having trouble matching. You will probably have to use Regex.Replace and reference the Unicode value of the characters in your regex: How can you strip non-ASCII characters from a string? (in C#)

Unicode/UTF8 reference: http://www.utf8-chartable.de/

Complete Unicode character set: http://www.unicode.org/charts/

Community
  • 1
  • 1
ElGavilan
  • 6,610
  • 16
  • 27
  • 36