title: How to prevent illegal characters to appear in my XML when retrieving it from SQL Server
body: <p>Sometimes the string values of Properties in my Classes become odd.  They contain illegal characters and are displayed like this (with boxes):</p>
  
  <pre><code>123[]45[]6789
  </code></pre>
  
  <p>I'm assuming those are illegal/unrecognized characters.  I serialize all my objects to XML and then upload them via Web Service. When I retrieve them again, some characters are replaced with oddities. This happens most often with hyphens and dashes that have been typed using Word. Is that the cause of it?  </p>
  
  <p>Is there anyway I can check to see if the string contains any of these unrecognized characters via regex or something?</p>