How to convert super- or subscript to normal text in C#
问题 I'm writing a slug generator for making nice urls. I'd like to convert m² to m2, but in a generic way that does this for all superscript (or subscript), not just a simple replace statement. Any ideas? 回答1: Thanks Johannes, you set me on the right track. The code with which I got it to work looks as follows: public string ConvertSuperscript(string value) { string stringFormKd = value.Normalize(NormalizationForm.FormKD); StringBuilder stringBuilder = new StringBuilder(); foreach (char character