Thanks, Johannes, you set me on the right track. The code I worked with is as follows:
public string ConvertSuperscript(string value) { string stringFormKd = value.Normalize(NormalizationForm.FormKD); StringBuilder stringBuilder = new StringBuilder(); foreach (char character in stringFormKd) { UnicodeCategory unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(character); if (unicodeCategory != UnicodeCategory.NonSpacingMark) { stringBuilder.Append(character); } } return stringBuilder.ToString().Normalize(NormalizationForm.FormKC); }
Previously, I tried canonical decomposition, but for the decomposition of compatibility to work correctly, it needed to work.
Jorrit Salverda Apr 20 '10 at 14:18 2010-04-20 14:18
source share