title: 22021: invalid byte sequence for encoding "UTF8": 0x00
body: <p>I am doing a bulk import to PostgreSQL from C# and one of the records gives me this error:</p>
  
  <blockquote>
    <p>22021: invalid byte sequence for encoding "UTF8": 0x00</p>
  </blockquote>
  
  <p>I googled it and the general advice is that this refers to a null field but in my instance this is not the case.  I tracked down the string that causes the error and it is this:</p>
  
  <blockquote>
    <p>Addresses the following: Let $A$ be a Banach algebra, and let $\sum:\0\rightarrow I\rightarrow\mathfrak A\overset\pi\to\longrightarrow A\rightarrow 0$ be an extension of $A$, where $\mathfrak A$ is a Banach algebra and $I$ is a closed ideal in $\mathfrak A$.</p>
  </blockquote>
  
  <p>I am reading this from an XML file and have UTF-8 defined on the file stream.</p>
  
  <p>The escaped string on my deserialized C# class is:</p>
  
  <pre><code>"Addresses the following: Let $A$ be a Banach algebra, and let $\\sum\\:\\0\\rightarrow I\\rightarrow\\mathfrak A\\overset\\pi\\to\\longrightarrow A\\rightarrow 0$ be an extension of $A$, where $\\mathfrak A$ is a Banach algebra and $I$ is a closed ideal in $\\mathfrak A$."
  </code></pre>
  
  <p>Obviously something is not right with the string.  I am guessing some sort of mathmatical symbols should be there but what exactly about this is breaking the import and making PostgreSQL report that it is a null field?  What format should that be read in?</p>
  
  <p>If I manually overwite this field the import works so it is 100% an issue with this string.</p>