title: Removing diacritics in Silverlight (String.Normalize issue)
body: <p>I did create a function that transforms diacritic characters into non-diacritic characters (based on this <a href="https://stackoverflow.com/questions/331279/how-to-change-diacritic-characters-to-non-diacritic-ones">post</a>)</p>
  
  <p>Here’s the code:</p>
  
  <pre><code>Public Function RemoveDiacritics(ByVal searchInString As String) As String
      Dim returnValue As String = ""
  
      Dim formD As String = searchInString.Normalize(System.Text.NormalizationForm.FormD)
      Dim unicodeCategory As System.Globalization.UnicodeCategory = Nothing
      Dim stringBuilder As New System.Text.StringBuilder()
  
  
      For formScan As Integer = 0 To formD.Length - 1
          unicodeCategory = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(formD(formScan))
          If unicodeCategory &lt;&gt; System.Globalization.UnicodeCategory.NonSpacingMark Then
              stringBuilder.Append(formD(formScan))
          End If
      Next
  
      returnValue = stringBuilder.ToString().Normalize(System.Text.NormalizationForm.FormC)
  
      Return returnValue
  
  End Function
  </code></pre>
  
  <p>Unfortunately, as the String.Normlize isn’t part of Silverlight, I need to find an other way to write this function.</p>
  
  <p>The only solution I have found so far is to create a service on the server side that would call the String.Normalize function and then return it to the client side… but that would create a huge performance issue.</p>
  
  <p>There must be a better alternative but right know I have no clue on how to fix this problem.</p>